;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 2.9.0 #5416 (Feb  3 2010) (UNIX)
; This file was generated Sun Sep 19 09:41:58 2010
;--------------------------------------------------------
; PIC16 port for the Microchip 16-bit core micros
;--------------------------------------------------------

	.ident "SDCC version 2.9.0 #5416 [pic16 port]"
	.file	"timer1.c"
	list	p=18f2550
	__config 0x300000, 0xe4
	__config 0x300001, 0xfe
	__config 0x300002, 0xee
	__config 0x300003, 0xfe
	__config 0x300005, 0x7d
	__config 0x300006, 0xbb
	__config 0x300008, 0xff
	__config 0x300009, 0xff
	__config 0x30000a, 0xff
	__config 0x30000b, 0xff
	__config 0x30000c, 0xff
	__config 0x30000d, 0xff

	radix dec

;--------------------------------------------------------
; public variables in this module
;--------------------------------------------------------
	global _CounterB
	global _CounterA
	global _j
	global _init_board
	global _EnableTimer1Interrupt
	global _Tmr1Carga
	global _initBuff
	global _add2cbuff
	global _echosel
	global _command_process
	global _delay_ms
	global _delay_us
	global _SelectServo
	global _turnPlus
	global _turnMinus
	global _rx
	global _wpointer
	global _rpointer
	global _SERVO1_ON
	global _SERVO2_ON
	global _SERVO3_ON
	global _SERVO4_ON
	global _SERVO5_ON
	global _SERVO6_ON
	global _SERVO7_ON
	global _SERVO8_ON
	global _flag_Phase
	global _posI
	global _xbuff
	global _cbuff
	global _rcvchar
	global _flagcommand
	global _setup_UART
	global _Printf
	global _rxint
	global _getch
	global _clear_buffer
	global _Print_str
	global _Print_dec
	global _Print_hex
	global _Print_byte
	global _main
	global _Ticks4WindowH
	global _Ticks4WindowL
	global _Ticks4CenterH
	global _Ticks4CenterL
	global _Ticks4MinimumH
	global _Ticks4MinimumL
	global _Ticks4MaximumH
	global _Ticks4MaximumL
	global _Ticks4Window
	global _Ticks4Minimum
	global _Ticks4Center
	global _Ticks4Maximum

;--------------------------------------------------------
; extern variables in this module
;--------------------------------------------------------
	extern __gptrget1
	extern _SPPDATAbits
	extern _SPPCFGbits
	extern _SPPEPSbits
	extern _SPPCONbits
	extern _UFRMLbits
	extern _UFRMHbits
	extern _UIRbits
	extern _UIEbits
	extern _UEIRbits
	extern _UEIEbits
	extern _USTATbits
	extern _UCONbits
	extern _UADDRbits
	extern _UCFGbits
	extern _UEP0bits
	extern _UEP1bits
	extern _UEP2bits
	extern _UEP3bits
	extern _UEP4bits
	extern _UEP5bits
	extern _UEP6bits
	extern _UEP7bits
	extern _UEP8bits
	extern _UEP9bits
	extern _UEP10bits
	extern _UEP11bits
	extern _UEP12bits
	extern _UEP13bits
	extern _UEP14bits
	extern _UEP15bits
	extern _PORTAbits
	extern _PORTBbits
	extern _PORTCbits
	extern _PORTDbits
	extern _PORTEbits
	extern _LATAbits
	extern _LATBbits
	extern _LATCbits
	extern _LATDbits
	extern _LATEbits
	extern _TRISAbits
	extern _TRISBbits
	extern _TRISCbits
	extern _TRISDbits
	extern _TRISEbits
	extern _OSCTUNEbits
	extern _PIE1bits
	extern _PIR1bits
	extern _IPR1bits
	extern _PIE2bits
	extern _PIR2bits
	extern _IPR2bits
	extern _EECON1bits
	extern _RCSTAbits
	extern _TXSTAbits
	extern _T3CONbits
	extern _CMCONbits
	extern _CVRCONbits
	extern _ECCP1ASbits
	extern _ECCP1DELbits
	extern _BAUDCONbits
	extern _CCP2CONbits
	extern _CCP1CONbits
	extern _ADCON2bits
	extern _ADCON1bits
	extern _ADCON0bits
	extern _SSPCON2bits
	extern _SSPCON1bits
	extern _SSPSTATbits
	extern _T2CONbits
	extern _T1CONbits
	extern _RCONbits
	extern _WDTCONbits
	extern _HLVDCONbits
	extern _OSCCONbits
	extern _T0CONbits
	extern _STATUSbits
	extern _FSR2Hbits
	extern _BSRbits
	extern _FSR1Hbits
	extern _FSR0Hbits
	extern _INTCON3bits
	extern _INTCON2bits
	extern _INTCONbits
	extern _TBLPTRUbits
	extern _PCLATHbits
	extern _PCLATUbits
	extern _STKPTRbits
	extern _TOSUbits
	extern _SPPDATA
	extern _SPPCFG
	extern _SPPEPS
	extern _SPPCON
	extern _UFRML
	extern _UFRMH
	extern _UIR
	extern _UIE
	extern _UEIR
	extern _UEIE
	extern _USTAT
	extern _UCON
	extern _UADDR
	extern _UCFG
	extern _UEP0
	extern _UEP1
	extern _UEP2
	extern _UEP3
	extern _UEP4
	extern _UEP5
	extern _UEP6
	extern _UEP7
	extern _UEP8
	extern _UEP9
	extern _UEP10
	extern _UEP11
	extern _UEP12
	extern _UEP13
	extern _UEP14
	extern _UEP15
	extern _PORTA
	extern _PORTB
	extern _PORTC
	extern _PORTD
	extern _PORTE
	extern _LATA
	extern _LATB
	extern _LATC
	extern _LATD
	extern _LATE
	extern _TRISA
	extern _TRISB
	extern _TRISC
	extern _TRISD
	extern _TRISE
	extern _OSCTUNE
	extern _PIE1
	extern _PIR1
	extern _IPR1
	extern _PIE2
	extern _PIR2
	extern _IPR2
	extern _EECON1
	extern _EECON2
	extern _EEDATA
	extern _EEADR
	extern _RCSTA
	extern _TXSTA
	extern _TXREG
	extern _RCREG
	extern _SPBRG
	extern _SPBRGH
	extern _T3CON
	extern _TMR3L
	extern _TMR3H
	extern _CMCON
	extern _CVRCON
	extern _ECCP1AS
	extern _ECCP1DEL
	extern _BAUDCON
	extern _CCP2CON
	extern _CCPR2L
	extern _CCPR2H
	extern _CCP1CON
	extern _CCPR1L
	extern _CCPR1H
	extern _ADCON2
	extern _ADCON1
	extern _ADCON0
	extern _ADRESL
	extern _ADRESH
	extern _SSPCON2
	extern _SSPCON1
	extern _SSPSTAT
	extern _SSPADD
	extern _SSPBUF
	extern _T2CON
	extern _PR2
	extern _TMR2
	extern _T1CON
	extern _TMR1L
	extern _TMR1H
	extern _RCON
	extern _WDTCON
	extern _HLVDCON
	extern _OSCCON
	extern _T0CON
	extern _TMR0L
	extern _TMR0H
	extern _STATUS
	extern _FSR2L
	extern _FSR2H
	extern _PLUSW2
	extern _PREINC2
	extern _POSTDEC2
	extern _POSTINC2
	extern _INDF2
	extern _BSR
	extern _FSR1L
	extern _FSR1H
	extern _PLUSW1
	extern _PREINC1
	extern _POSTDEC1
	extern _POSTINC1
	extern _INDF1
	extern _WREG
	extern _FSR0L
	extern _FSR0H
	extern _PLUSW0
	extern _PREINC0
	extern _POSTDEC0
	extern _POSTINC0
	extern _INDF0
	extern _INTCON3
	extern _INTCON2
	extern _INTCON
	extern _PRODL
	extern _PRODH
	extern _TABLAT
	extern _TBLPTRL
	extern _TBLPTRH
	extern _TBLPTRU
	extern _PCL
	extern _PCLATH
	extern _PCLATU
	extern _STKPTR
	extern _TOSL
	extern _TOSH
	extern _TOSU
	extern _delay10tcy
	extern _delay1ktcy
	extern __divuint
	extern __moduint
	extern _atoi
	extern _strcpy
	extern _strncpy
	extern __mulint
	extern ___uchar2fs
	extern ___fsmul
	extern ___fsadd
	extern ___fs2uint
;--------------------------------------------------------
;	Equates to used internal registers
;--------------------------------------------------------
STATUS	equ	0xfd8
PCL	equ	0xff9
PCLATH	equ	0xffa
PCLATU	equ	0xffb
WREG	equ	0xfe8
BSR	equ	0xfe0
TBLPTRL	equ	0xff6
TBLPTRH	equ	0xff7
TBLPTRU	equ	0xff8
TABLAT	equ	0xff5
FSR0L	equ	0xfe9
FSR0H	equ	0xfea
FSR1L	equ	0xfe1
FSR2L	equ	0xfd9
INDF0	equ	0xfef
POSTINC0	equ	0xfee
POSTDEC1	equ	0xfe5
PREINC1	equ	0xfe4
PLUSW2	equ	0xfdb
PRODL	equ	0xff3
PRODH	equ	0xff4


	idata
_Ticks4NextInterruptH	db	0xcf, 0x00
_Ticks4NextInterruptL	db	0x2c, 0x00
_Ticks4NextInterrupt	db	0x2c, 0xcf
_tempom	db	0x00, 0x00
_tempo	db	0x00, 0x00
_Servo_Idx	db	0x00, 0x00
_SERVO1_ON	db	0x01
_SERVO2_ON	db	0x01
_SERVO3_ON	db	0x01
_SERVO4_ON	db	0x01
_SERVO5_ON	db	0x01
_SERVO6_ON	db	0x01
_SERVO7_ON	db	0x01
_SERVO8_ON	db	0x01
_j	db	0xff, 0x00
_xbuff	db	0x00
_rcvchar	db	0x00
_flagcommand	db	0x00


; Internal registers
.registers	udata_ovr	0x0000
r0x00	res	1
r0x01	res	1
r0x02	res	1
r0x03	res	1
r0x04	res	1
r0x05	res	1
r0x06	res	1
r0x07	res	1
r0x08	res	1
r0x09	res	1
r0x0a	res	1
r0x0b	res	1

udata_timer1_0	udata
_Servo_PWM	res	16

udata_timer1_1	udata
_tempol	res	2

udata_timer1_2	udata
_tempoh	res	2

udata_timer1_3	udata
_CounterA	res	1

udata_timer1_4	udata
_CounterB	res	1

udata_timer1_5	udata
_wpointer	res	1

udata_timer1_6	udata
_rpointer	res	1

udata_timer1_7	udata
_rx	res	128

udata_timer1_8	udata
_Print_hex_hexa_1_1	res	16

udata_timer1_9	udata
_flag_Phase	res	1

udata_timer1_10	udata
_Servo_PWMH	res	16

udata_timer1_11	udata
_Servo_PWML	res	16

udata_timer1_12	udata
_posI	res	2

udata_timer1_13	udata
_cbuff	res	10

udata_timer1_14	udata
_command_process_cmd_1_1	res	10

udata_timer1_15	udata
_command_process_servo_1_1	res	2

udata_timer1_16	udata
_command_process_pos_1_1	res	4

udata_timer1_17	udata
_command_process_velocidad_1_1	res	4

;--------------------------------------------------------
; interrupt vector 
;--------------------------------------------------------

;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
; ; Starting pCode block for absolute section
; ;-----------------------------------------
S_timer1_ivec_0x1_isr_Tmr1	code	0X000008
ivec_0x1_isr_Tmr1:
	GOTO	_isr_Tmr1

; ; Starting pCode block for absolute section
; ;-----------------------------------------
S_timer1_ivec_0x2_isr_Serial	code	0X000018
ivec_0x2_isr_Serial:
	GOTO	_isr_Serial

; I code from now on!
; ; Starting pCode block
S_timer1__main	code
_main:
	.line	200; timer1.c	RCONbits.IPEN=1; //interrupciones por prioridad habilitadas
	BSF	_RCONbits, 7
	.line	201; timer1.c	init_board();
	CALL	_init_board
	.line	202; timer1.c	Print_str("Dispositivo inicializado");
	MOVLW	UPPER(__str_0)
	MOVWF	POSTDEC1
	MOVLW	HIGH(__str_0)
	MOVWF	POSTDEC1
	MOVLW	LOW(__str_0)
	MOVWF	POSTDEC1
	CALL	_Print_str
	MOVLW	0x03
	ADDWF	FSR1L, F
	.line	203; timer1.c	Printf(INTRO);
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	204; timer1.c	Print_str("PIC18F2550 en SDCC");
	MOVLW	UPPER(__str_1)
	MOVWF	POSTDEC1
	MOVLW	HIGH(__str_1)
	MOVWF	POSTDEC1
	MOVLW	LOW(__str_1)
	MOVWF	POSTDEC1
	CALL	_Print_str
	MOVLW	0x03
	ADDWF	FSR1L, F
	.line	205; timer1.c	Printf(INTRO);
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	206; timer1.c	delay_ms(500); //tiempo de espera
	MOVLW	0x01
	MOVWF	POSTDEC1
	MOVLW	0xf4
	MOVWF	POSTDEC1
	CALL	_delay_ms
	MOVLW	0x02
	ADDWF	FSR1L, F
	.line	207; timer1.c	initBuff();
	CALL	_initBuff
	.line	209; timer1.c	for (i=0;i<9;i++)
	CLRF	r0x00
	CLRF	r0x01
	CLRF	r0x02
	CLRF	r0x03
_00346_DS_:
	MOVF	r0x01, W
	ADDLW	0x80
	ADDLW	0x80
	BNZ	_00357_DS_
	MOVLW	0x09
	SUBWF	r0x00, W
_00357_DS_:
	BTFSC	STATUS, 0
	BRA	_00349_DS_
	.line	211; timer1.c	Servo_PWMH[i] = Ticks4CenterH;
	MOVLW	LOW(_Servo_PWMH)
	ADDWF	r0x02, W
	MOVWF	r0x04
	MOVLW	HIGH(_Servo_PWMH)
	ADDWFC	r0x03, W
	MOVWF	r0x05
	MOVLW	LOW(_Ticks4CenterH)
	MOVWF	TBLPTRL
	MOVLW	HIGH(_Ticks4CenterH)
	MOVWF	TBLPTRH
	MOVLW	UPPER(_Ticks4CenterH)
	MOVWF	TBLPTRU
	TBLRD*+	
	MOVFF	TABLAT, r0x06
	TBLRD*+	
	MOVFF	TABLAT, r0x07
	MOVFF	r0x04, FSR0L
	MOVFF	r0x05, FSR0H
	MOVFF	r0x06, POSTINC0
	MOVFF	r0x07, INDF0
	.line	212; timer1.c	Servo_PWML[i] = Ticks4CenterL;
	MOVLW	LOW(_Servo_PWML)
	ADDWF	r0x02, W
	MOVWF	r0x04
	MOVLW	HIGH(_Servo_PWML)
	ADDWFC	r0x03, W
	MOVWF	r0x05
	MOVLW	LOW(_Ticks4CenterL)
	MOVWF	TBLPTRL
	MOVLW	HIGH(_Ticks4CenterL)
	MOVWF	TBLPTRH
	MOVLW	UPPER(_Ticks4CenterL)
	MOVWF	TBLPTRU
	TBLRD*+	
	MOVFF	TABLAT, r0x06
	TBLRD*+	
	MOVFF	TABLAT, r0x07
	MOVFF	r0x04, FSR0L
	MOVFF	r0x05, FSR0H
	MOVFF	r0x06, POSTINC0
	MOVFF	r0x07, INDF0
	.line	209; timer1.c	for (i=0;i<9;i++)
	MOVLW	0x02
	ADDWF	r0x02, F
	BTFSC	STATUS, 0
	INCF	r0x03, F
	INCF	r0x00, F
	BTFSC	STATUS, 0
	INCF	r0x01, F
	BRA	_00346_DS_
_00349_DS_:
	.line	215; timer1.c	EnableTimer1Interrupt();
	CALL	_EnableTimer1Interrupt
	.line	216; timer1.c	tempo = Ticks4Center;
	MOVLW	LOW(_Ticks4Center)
	MOVWF	TBLPTRL
	MOVLW	HIGH(_Ticks4Center)
	MOVWF	TBLPTRH
	MOVLW	UPPER(_Ticks4Center)
	MOVWF	TBLPTRU
	TBLRD*+	
	MOVFF	TABLAT, _tempo
	TBLRD*+	
	MOVFF	TABLAT, (_tempo + 1)
	BANKSEL	_tempoh
	.line	217; timer1.c	tempoh = tempo & 0xFF00;
	CLRF	_tempoh, B
	BANKSEL	(_tempo + 1)
	MOVF	(_tempo + 1), W, B
	BANKSEL	(_tempoh + 1)
	MOVWF	(_tempoh + 1), B
	BANKSEL	_tempo
	.line	218; timer1.c	tempol = tempo & 0x00FF;
	MOVF	_tempo, W, B
	BANKSEL	_tempol
	MOVWF	_tempol, B
	BANKSEL	(_tempol + 1)
	CLRF	(_tempol + 1), B
	BANKSEL	_tempoh
	.line	219; timer1.c	Tmr1Carga(tempoh, tempol);
	MOVF	_tempoh, W, B
	MOVWF	r0x00
	BANKSEL	_tempol
	MOVF	_tempol, W, B
	MOVWF	r0x01
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_Tmr1Carga
	MOVLW	0x02
	ADDWF	FSR1L, F
	.line	220; timer1.c	posI = Ticks4Center;
	MOVLW	LOW(_Ticks4Center)
	MOVWF	TBLPTRL
	MOVLW	HIGH(_Ticks4Center)
	MOVWF	TBLPTRH
	MOVLW	UPPER(_Ticks4Center)
	MOVWF	TBLPTRU
	TBLRD*+	
	MOVFF	TABLAT, _posI
	TBLRD*+	
	MOVFF	TABLAT, (_posI + 1)
_00344_DS_:
	BANKSEL	_flagcommand
	.line	227; timer1.c	if(flagcommand)   //si ya presionaste enter
	MOVF	_flagcommand, W, B
	BZ	_00344_DS_
	.line	229; timer1.c	command_process();
	CALL	_command_process
	BRA	_00344_DS_
	RETURN	

; ; Starting pCode block
S_timer1__turnMinus	code
_turnMinus:
	.line	502; timer1.c	void turnMinus(int vueltas, unsigned char vel, unsigned char Servo)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVFF	r0x04, POSTDEC1
	MOVFF	r0x05, POSTDEC1
	MOVFF	r0x06, POSTDEC1
	MOVFF	r0x07, POSTDEC1
	MOVFF	r0x08, POSTDEC1
	MOVFF	r0x09, POSTDEC1
	MOVFF	r0x0a, POSTDEC1
	MOVFF	r0x0b, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	MOVLW	0x04
	MOVFF	PLUSW2, r0x02
	MOVLW	0x05
	MOVFF	PLUSW2, r0x03
; ;multiply lit val:0x02 by variable r0x03 and store in r0x03
; ;Unrolled 8 X 8 multiplication
; ;FIXME: the function does not support result==WREG
	.line	506; timer1.c	for(i=0;i<vueltas;i++)
	BCF	STATUS, 0
	RLCF	r0x03, F
	CLRF	r0x04
	CLRF	r0x05
_00536_DS_:
	MOVF	r0x05, W
	ADDLW	0x80
	MOVWF	PRODL
	MOVF	r0x01, W
	ADDLW	0x80
	SUBWF	PRODL, W
	BNZ	_00545_DS_
	MOVF	r0x00, W
	SUBWF	r0x04, W
_00545_DS_:
	BTFSC	STATUS, 0
	BRA	_00540_DS_
	.line	508; timer1.c	tempoh = Servo_PWMH[Servo];
	MOVLW	LOW(_Servo_PWMH)
	ADDWF	r0x03, W
	MOVWF	r0x06
	CLRF	r0x07
	MOVLW	HIGH(_Servo_PWMH)
	ADDWFC	r0x07, F
	MOVFF	r0x06, FSR0L
	MOVFF	r0x07, FSR0H
	MOVFF	POSTINC0, _tempoh
	MOVFF	INDF0, (_tempoh + 1)
	BANKSEL	_tempoh
	.line	509; timer1.c	tempoh = tempoh << 8;
	MOVF	_tempoh, W, B
	BANKSEL	(_tempoh + 1)
	MOVWF	(_tempoh + 1), B
	BANKSEL	_tempoh
	CLRF	_tempoh, B
	.line	510; timer1.c	tempo  = tempoh | Servo_PWML[Servo];
	MOVLW	LOW(_Servo_PWML)
	ADDWF	r0x03, W
	MOVWF	r0x08
	CLRF	r0x09
	MOVLW	HIGH(_Servo_PWML)
	ADDWFC	r0x09, F
	MOVFF	r0x08, FSR0L
	MOVFF	r0x09, FSR0H
	MOVFF	POSTINC0, r0x0a
	MOVFF	INDF0, r0x0b
	MOVF	r0x0a, W
	BANKSEL	_tempoh
	IORWF	_tempoh, W, B
	BANKSEL	_tempo
	MOVWF	_tempo, B
	MOVF	r0x0b, W
	BANKSEL	(_tempoh + 1)
	IORWF	(_tempoh + 1), W, B
	BANKSEL	(_tempo + 1)
	MOVWF	(_tempo + 1), B
	.line	511; timer1.c	tempo -= vel;
	MOVFF	r0x02, r0x0a
	CLRF	r0x0b
	MOVF	r0x0a, W
	BANKSEL	_tempo
	SUBWF	_tempo, F, B
	MOVF	r0x0b, W
	BANKSEL	(_tempo + 1)
	SUBWFB	(_tempo + 1), F, B
	BANKSEL	_tempo
	.line	512; timer1.c	Servo_PWML[Servo] = tempo & 0x00FF;
	MOVF	_tempo, W, B
	MOVWF	r0x0a
	CLRF	r0x0b
	MOVFF	r0x08, FSR0L
	MOVFF	r0x09, FSR0H
	MOVFF	r0x0a, POSTINC0
	MOVFF	r0x0b, INDF0
	BANKSEL	_tempoh
	.line	513; timer1.c	tempoh = tempo & 0xFF00;
	CLRF	_tempoh, B
	BANKSEL	(_tempo + 1)
	MOVF	(_tempo + 1), W, B
	BANKSEL	(_tempoh + 1)
	MOVWF	(_tempoh + 1), B
	BANKSEL	(_tempoh + 1)
	.line	514; timer1.c	tempoh = tempoh >> 8;
	MOVF	(_tempoh + 1), W, B
	BANKSEL	_tempoh
	MOVWF	_tempoh, B
	BANKSEL	(_tempoh + 1)
	CLRF	(_tempoh + 1), B
	.line	515; timer1.c	Servo_PWMH[Servo] = tempoh;
	MOVFF	r0x06, FSR0L
	MOVFF	r0x07, FSR0H
	MOVFF	_tempoh, POSTINC0
	MOVFF	(_tempoh + 1), INDF0
	.line	516; timer1.c	delay_us(100);
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x64
	MOVWF	POSTDEC1
	CALL	_delay_us
	MOVLW	0x02
	ADDWF	FSR1L, F
	.line	506; timer1.c	for(i=0;i<vueltas;i++)
	INCF	r0x04, F
	BTFSC	STATUS, 0
	INCF	r0x05, F
	BRA	_00536_DS_
_00540_DS_:
	MOVFF	PREINC1, r0x0b
	MOVFF	PREINC1, r0x0a
	MOVFF	PREINC1, r0x09
	MOVFF	PREINC1, r0x08
	MOVFF	PREINC1, r0x07
	MOVFF	PREINC1, r0x06
	MOVFF	PREINC1, r0x05
	MOVFF	PREINC1, r0x04
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__turnPlus	code
_turnPlus:
	.line	484; timer1.c	void turnPlus(int vueltas, unsigned char vel, unsigned char Servo)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVFF	r0x04, POSTDEC1
	MOVFF	r0x05, POSTDEC1
	MOVFF	r0x06, POSTDEC1
	MOVFF	r0x07, POSTDEC1
	MOVFF	r0x08, POSTDEC1
	MOVFF	r0x09, POSTDEC1
	MOVFF	r0x0a, POSTDEC1
	MOVFF	r0x0b, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	MOVLW	0x04
	MOVFF	PLUSW2, r0x02
	MOVLW	0x05
	MOVFF	PLUSW2, r0x03
; ;multiply lit val:0x02 by variable r0x03 and store in r0x03
; ;Unrolled 8 X 8 multiplication
; ;FIXME: the function does not support result==WREG
	.line	488; timer1.c	for(i=0;i<vueltas;i++)
	BCF	STATUS, 0
	RLCF	r0x03, F
	CLRF	r0x04
	CLRF	r0x05
_00522_DS_:
	MOVF	r0x05, W
	ADDLW	0x80
	MOVWF	PRODL
	MOVF	r0x01, W
	ADDLW	0x80
	SUBWF	PRODL, W
	BNZ	_00531_DS_
	MOVF	r0x00, W
	SUBWF	r0x04, W
_00531_DS_:
	BTFSC	STATUS, 0
	BRA	_00526_DS_
	.line	490; timer1.c	tempoh = Servo_PWMH[Servo];
	MOVLW	LOW(_Servo_PWMH)
	ADDWF	r0x03, W
	MOVWF	r0x06
	CLRF	r0x07
	MOVLW	HIGH(_Servo_PWMH)
	ADDWFC	r0x07, F
	MOVFF	r0x06, FSR0L
	MOVFF	r0x07, FSR0H
	MOVFF	POSTINC0, _tempoh
	MOVFF	INDF0, (_tempoh + 1)
	BANKSEL	_tempoh
	.line	491; timer1.c	tempoh = tempoh << 8;
	MOVF	_tempoh, W, B
	BANKSEL	(_tempoh + 1)
	MOVWF	(_tempoh + 1), B
	BANKSEL	_tempoh
	CLRF	_tempoh, B
	.line	492; timer1.c	tempo  = tempoh | Servo_PWML[Servo];
	MOVLW	LOW(_Servo_PWML)
	ADDWF	r0x03, W
	MOVWF	r0x08
	CLRF	r0x09
	MOVLW	HIGH(_Servo_PWML)
	ADDWFC	r0x09, F
	MOVFF	r0x08, FSR0L
	MOVFF	r0x09, FSR0H
	MOVFF	POSTINC0, r0x0a
	MOVFF	INDF0, r0x0b
	MOVF	r0x0a, W
	BANKSEL	_tempoh
	IORWF	_tempoh, W, B
	BANKSEL	_tempo
	MOVWF	_tempo, B
	MOVF	r0x0b, W
	BANKSEL	(_tempoh + 1)
	IORWF	(_tempoh + 1), W, B
	BANKSEL	(_tempo + 1)
	MOVWF	(_tempo + 1), B
	.line	493; timer1.c	tempo += vel;
	MOVFF	r0x02, r0x0a
	CLRF	r0x0b
	MOVF	r0x0a, W
	BANKSEL	_tempo
	ADDWF	_tempo, F, B
	MOVF	r0x0b, W
	BANKSEL	(_tempo + 1)
	ADDWFC	(_tempo + 1), F, B
	BANKSEL	_tempo
	.line	494; timer1.c	Servo_PWML[Servo] = tempo & 0x00FF;
	MOVF	_tempo, W, B
	MOVWF	r0x0a
	CLRF	r0x0b
	MOVFF	r0x08, FSR0L
	MOVFF	r0x09, FSR0H
	MOVFF	r0x0a, POSTINC0
	MOVFF	r0x0b, INDF0
	BANKSEL	_tempoh
	.line	495; timer1.c	tempoh = tempo & 0xFF00;
	CLRF	_tempoh, B
	BANKSEL	(_tempo + 1)
	MOVF	(_tempo + 1), W, B
	BANKSEL	(_tempoh + 1)
	MOVWF	(_tempoh + 1), B
	BANKSEL	(_tempoh + 1)
	.line	496; timer1.c	tempoh = tempoh >> 8;
	MOVF	(_tempoh + 1), W, B
	BANKSEL	_tempoh
	MOVWF	_tempoh, B
	BANKSEL	(_tempoh + 1)
	CLRF	(_tempoh + 1), B
	.line	497; timer1.c	Servo_PWMH[Servo] = tempoh;
	MOVFF	r0x06, FSR0L
	MOVFF	r0x07, FSR0H
	MOVFF	_tempoh, POSTINC0
	MOVFF	(_tempoh + 1), INDF0
	.line	498; timer1.c	delay_us(100);
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x64
	MOVWF	POSTDEC1
	CALL	_delay_us
	MOVLW	0x02
	ADDWF	FSR1L, F
	.line	488; timer1.c	for(i=0;i<vueltas;i++)
	INCF	r0x04, F
	BTFSC	STATUS, 0
	INCF	r0x05, F
	BRA	_00522_DS_
_00526_DS_:
	MOVFF	PREINC1, r0x0b
	MOVFF	PREINC1, r0x0a
	MOVFF	PREINC1, r0x09
	MOVFF	PREINC1, r0x08
	MOVFF	PREINC1, r0x07
	MOVFF	PREINC1, r0x06
	MOVFF	PREINC1, r0x05
	MOVFF	PREINC1, r0x04
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__SelectServo	code
_SelectServo:
	.line	477; timer1.c	unsigned int SelectServo(unsigned char Servo)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
; ;multiply lit val:0x02 by variable r0x00 and store in r0x00
; ;Unrolled 8 X 8 multiplication
; ;FIXME: the function does not support result==WREG
	.line	479; timer1.c	tempoh = Servo_PWMH[Servo];
	BCF	STATUS, 0
	RLCF	r0x00, F
	MOVLW	LOW(_Servo_PWMH)
	ADDWF	r0x00, W
	MOVWF	r0x01
	CLRF	r0x02
	MOVLW	HIGH(_Servo_PWMH)
	ADDWFC	r0x02, F
	MOVFF	r0x01, FSR0L
	MOVFF	r0x02, FSR0H
	MOVFF	POSTINC0, _tempoh
	MOVFF	INDF0, (_tempoh + 1)
	BANKSEL	_tempoh
	.line	480; timer1.c	tempo = tempoh << 8;
	MOVF	_tempoh, W, B
	BANKSEL	(_tempo + 1)
	MOVWF	(_tempo + 1), B
	BANKSEL	_tempo
	CLRF	_tempo, B
	.line	481; timer1.c	return (tempo | Servo_PWML[Servo]);
	CLRF	r0x01
	MOVLW	LOW(_Servo_PWML)
	ADDWF	r0x00, F
	MOVLW	HIGH(_Servo_PWML)
	ADDWFC	r0x01, F
	MOVFF	r0x00, FSR0L
	MOVFF	r0x01, FSR0H
	MOVFF	POSTINC0, r0x00
	MOVFF	INDF0, r0x01
	BANKSEL	_tempo
	MOVF	_tempo, W, B
	IORWF	r0x00, F
	BANKSEL	(_tempo + 1)
	MOVF	(_tempo + 1), W, B
	IORWF	r0x01, F
	MOVFF	r0x01, PRODL
	MOVF	r0x00, W
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__delay_us	code
_delay_us:
	.line	473; timer1.c	void delay_us(int milis){
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	.line	474; timer1.c	delay10tcy(1*milis);
	MOVF	r0x00, W
	CALL	_delay10tcy
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__delay_ms	code
_delay_ms:
	.line	468; timer1.c	void delay_ms(int milis){
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
; ;multiply lit val:0x0a by variable r0x00 and store in r0x00
; ;Unrolled 8 X 8 multiplication
; ;FIXME: the function does not support result==WREG
	.line	469; timer1.c	delay1ktcy(10*milis);
	MOVF	r0x00, W
	MULLW	0x0a
	MOVFF	PRODL, r0x00
	MOVF	r0x00, W
	CALL	_delay1ktcy
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__command_process	code
_command_process:
	.line	328; timer1.c	void command_process()
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVFF	r0x04, POSTDEC1
	MOVFF	r0x05, POSTDEC1
	MOVFF	r0x06, POSTDEC1
	BANKSEL	_flagcommand
	.line	345; timer1.c	flagcommand=false;
	CLRF	_flagcommand, B
	.line	347; timer1.c	strcpy(cmd,cbuff);  
	MOVLW	HIGH(_command_process_cmd_1_1)
	MOVWF	r0x01
	MOVLW	LOW(_command_process_cmd_1_1)
	MOVWF	r0x00
	MOVLW	0x80
	MOVWF	r0x02
	MOVLW	HIGH(_cbuff)
	MOVWF	r0x04
	MOVLW	LOW(_cbuff)
	MOVWF	r0x03
	MOVLW	0x80
	MOVWF	r0x05
	MOVF	r0x05, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_strcpy
	MOVLW	0x06
	ADDWF	FSR1L, F
	.line	348; timer1.c	strncpy(servo,cmd,1);
	MOVLW	HIGH(_command_process_servo_1_1)
	MOVWF	r0x01
	MOVLW	LOW(_command_process_servo_1_1)
	MOVWF	r0x00
	MOVLW	0x80
	MOVWF	r0x02
	MOVLW	HIGH(_command_process_cmd_1_1)
	MOVWF	r0x04
	MOVLW	LOW(_command_process_cmd_1_1)
	MOVWF	r0x03
	MOVLW	0x80
	MOVWF	r0x05
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x01
	MOVWF	POSTDEC1
	MOVF	r0x05, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_strncpy
	MOVLW	0x08
	ADDWF	FSR1L, F
	.line	350; timer1.c	strcpy(cmd,cbuff); 
	MOVLW	HIGH(_command_process_cmd_1_1)
	MOVWF	r0x01
	MOVLW	LOW(_command_process_cmd_1_1)
	MOVWF	r0x00
	MOVLW	0x80
	MOVWF	r0x02
	MOVLW	HIGH(_cbuff)
	MOVWF	r0x04
	MOVLW	LOW(_cbuff)
	MOVWF	r0x03
	MOVLW	0x80
	MOVWF	r0x05
	MOVF	r0x05, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_strcpy
	MOVLW	0x06
	ADDWF	FSR1L, F
	.line	351; timer1.c	for(i=1;i<4;i++){
	MOVLW	0x01
	MOVWF	r0x00
	CLRF	r0x01
_00467_DS_:
	MOVF	r0x01, W
	ADDLW	0x80
	ADDLW	0x80
	BNZ	_00491_DS_
	MOVLW	0x04
	SUBWF	r0x00, W
_00491_DS_:
	BC	_00470_DS_
	.line	352; timer1.c	pos[i-1]= cmd[i];
	MOVF	r0x00, W
	MOVWF	r0x02
	DECF	r0x02, F
	CLRF	r0x03
	BTFSC	r0x02, 7
	SETF	r0x03
	MOVLW	LOW(_command_process_pos_1_1)
	ADDWF	r0x02, F
	MOVLW	HIGH(_command_process_pos_1_1)
	ADDWFC	r0x03, F
	MOVLW	LOW(_command_process_cmd_1_1)
	ADDWF	r0x00, W
	MOVWF	r0x04
	MOVLW	HIGH(_command_process_cmd_1_1)
	ADDWFC	r0x01, W
	MOVWF	r0x05
	MOVFF	r0x04, FSR0L
	MOVFF	r0x05, FSR0H
	MOVFF	INDF0, r0x04
	MOVFF	r0x02, FSR0L
	MOVFF	r0x03, FSR0H
	MOVFF	r0x04, INDF0
	.line	351; timer1.c	for(i=1;i<4;i++){
	INCF	r0x00, F
	BTFSC	STATUS, 0
	INCF	r0x01, F
	BRA	_00467_DS_
_00470_DS_:
	.line	354; timer1.c	posicion = atoi(pos);
	MOVLW	HIGH(_command_process_pos_1_1)
	MOVWF	r0x01
	MOVLW	LOW(_command_process_pos_1_1)
	MOVWF	r0x00
	MOVLW	0x80
	MOVWF	r0x02
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_atoi
	MOVWF	r0x00
	MOVFF	PRODL, r0x01
	MOVLW	0x03
	ADDWF	FSR1L, F
	.line	356; timer1.c	strcpy(cmd,cbuff);
	MOVLW	HIGH(_command_process_cmd_1_1)
	MOVWF	r0x02
	MOVLW	LOW(_command_process_cmd_1_1)
	MOVWF	r0x01
	MOVLW	0x80
	MOVWF	r0x03
	MOVLW	HIGH(_cbuff)
	MOVWF	r0x05
	MOVLW	LOW(_cbuff)
	MOVWF	r0x04
	MOVLW	0x80
	MOVWF	r0x06
	MOVF	r0x06, W
	MOVWF	POSTDEC1
	MOVF	r0x05, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	CALL	_strcpy
	MOVLW	0x06
	ADDWF	FSR1L, F
	.line	357; timer1.c	for(i=4;i<7;i++)
	MOVLW	0x04
	MOVWF	r0x01
	CLRF	r0x02
_00471_DS_:
	MOVF	r0x02, W
	ADDLW	0x80
	ADDLW	0x80
	BNZ	_00492_DS_
	MOVLW	0x07
	SUBWF	r0x01, W
_00492_DS_:
	BC	_00474_DS_
	.line	359; timer1.c	velocidad[i-4]=cmd[i];
	MOVF	r0x01, W
	MOVWF	r0x03
	MOVLW	0xfc
	ADDWF	r0x03, F
	CLRF	r0x04
	BTFSC	r0x03, 7
	SETF	r0x04
	MOVLW	LOW(_command_process_velocidad_1_1)
	ADDWF	r0x03, F
	MOVLW	HIGH(_command_process_velocidad_1_1)
	ADDWFC	r0x04, F
	MOVLW	LOW(_command_process_cmd_1_1)
	ADDWF	r0x01, W
	MOVWF	r0x05
	MOVLW	HIGH(_command_process_cmd_1_1)
	ADDWFC	r0x02, W
	MOVWF	r0x06
	MOVFF	r0x05, FSR0L
	MOVFF	r0x06, FSR0H
	MOVFF	INDF0, r0x05
	MOVFF	r0x03, FSR0L
	MOVFF	r0x04, FSR0H
	MOVFF	r0x05, INDF0
	.line	357; timer1.c	for(i=4;i<7;i++)
	INCF	r0x01, F
	BTFSC	STATUS, 0
	INCF	r0x02, F
	BRA	_00471_DS_
_00474_DS_:
	.line	361; timer1.c	vel = atoi(velocidad);
	MOVLW	HIGH(_command_process_velocidad_1_1)
	MOVWF	r0x02
	MOVLW	LOW(_command_process_velocidad_1_1)
	MOVWF	r0x01
	MOVLW	0x80
	MOVWF	r0x03
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	CALL	_atoi
	MOVWF	r0x01
	MOVFF	PRODL, r0x02
	MOVLW	0x03
	ADDWF	FSR1L, F
	BANKSEL	_tempo
	.line	362; timer1.c	tempo = 0;
	CLRF	_tempo, B
	BANKSEL	(_tempo + 1)
	CLRF	(_tempo + 1), B
	BANKSEL	_tempoh
	.line	363; timer1.c	tempoh=0;
	CLRF	_tempoh, B
	BANKSEL	(_tempoh + 1)
	CLRF	(_tempoh + 1), B
	BANKSEL	_tempol
	.line	364; timer1.c	tempol=0;
	CLRF	_tempol, B
	BANKSEL	(_tempol + 1)
	CLRF	(_tempol + 1), B
	.line	365; timer1.c	switch(servo[0]){
	MOVFF	_command_process_servo_1_1, r0x02
	MOVLW	0x61
	SUBWF	r0x02, W
	BTFSS	STATUS, 0
	BRA	_00445_DS_
	MOVLW	0x67
	SUBWF	r0x02, W
	BTFSC	STATUS, 0
	BRA	_00445_DS_
	MOVLW	0x9f
	ADDWF	r0x02, F
	MOVFF	r0x07, POSTDEC1
	MOVFF	r0x08, POSTDEC1
	CLRF	r0x08
	RLCF	r0x02, W
	RLCF	r0x08, F
	RLCF	WREG, W
	RLCF	r0x08, F
	ANDLW	0xfc
	MOVWF	r0x07
	MOVLW	UPPER(_00495_DS_)
	MOVWF	PCLATU
	MOVLW	HIGH(_00495_DS_)
	MOVWF	PCLATH
	MOVLW	LOW(_00495_DS_)
	ADDWF	r0x07, F
	MOVF	r0x08, W
	ADDWFC	PCLATH, F
	BTFSC	STATUS, 0
	INCF	PCLATU, F
	MOVF	r0x07, W
	MOVFF	PREINC1, r0x08
	MOVFF	PREINC1, r0x07
	MOVWF	PCL
_00495_DS_:
	GOTO	_00439_DS_
	GOTO	_00440_DS_
	GOTO	_00441_DS_
	GOTO	_00442_DS_
	GOTO	_00443_DS_
	GOTO	_00444_DS_
_00439_DS_:
	.line	367; timer1.c	posI=SelectServo(0);
	MOVLW	0x00
	MOVWF	POSTDEC1
	CALL	_SelectServo
	BANKSEL	_posI
	MOVWF	_posI, B
	MOVFF	PRODL, (_posI + 1)
	INCF	FSR1L, F
	.line	368; timer1.c	break;
	BRA	_00446_DS_
_00440_DS_:
	.line	370; timer1.c	posI=SelectServo(1);
	MOVLW	0x01
	MOVWF	POSTDEC1
	CALL	_SelectServo
	BANKSEL	_posI
	MOVWF	_posI, B
	MOVFF	PRODL, (_posI + 1)
	INCF	FSR1L, F
	.line	371; timer1.c	break;
	BRA	_00446_DS_
_00441_DS_:
	.line	373; timer1.c	posI=SelectServo(2);
	MOVLW	0x02
	MOVWF	POSTDEC1
	CALL	_SelectServo
	BANKSEL	_posI
	MOVWF	_posI, B
	MOVFF	PRODL, (_posI + 1)
	INCF	FSR1L, F
	.line	374; timer1.c	break;
	BRA	_00446_DS_
_00442_DS_:
	.line	376; timer1.c	posI=SelectServo(3);
	MOVLW	0x03
	MOVWF	POSTDEC1
	CALL	_SelectServo
	BANKSEL	_posI
	MOVWF	_posI, B
	MOVFF	PRODL, (_posI + 1)
	INCF	FSR1L, F
	.line	377; timer1.c	break;
	BRA	_00446_DS_
_00443_DS_:
	.line	379; timer1.c	posI=SelectServo(4);
	MOVLW	0x04
	MOVWF	POSTDEC1
	CALL	_SelectServo
	BANKSEL	_posI
	MOVWF	_posI, B
	MOVFF	PRODL, (_posI + 1)
	INCF	FSR1L, F
	.line	380; timer1.c	break;
	BRA	_00446_DS_
_00444_DS_:
	.line	382; timer1.c	posI=SelectServo(5);
	MOVLW	0x05
	MOVWF	POSTDEC1
	CALL	_SelectServo
	BANKSEL	_posI
	MOVWF	_posI, B
	MOVFF	PRODL, (_posI + 1)
	INCF	FSR1L, F
	.line	383; timer1.c	break;
	BRA	_00446_DS_
_00445_DS_:
	.line	385; timer1.c	Print_str("3"); //Error 3 opcion elegida no válida
	MOVLW	UPPER(__str_3)
	MOVWF	POSTDEC1
	MOVLW	HIGH(__str_3)
	MOVWF	POSTDEC1
	MOVLW	LOW(__str_3)
	MOVWF	POSTDEC1
	CALL	_Print_str
	MOVLW	0x03
	ADDWF	FSR1L, F
	.line	386; timer1.c	Printf(INTRO);
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
_00446_DS_:
	.line	389; timer1.c	posF= 106.66 * posicion + 8399;
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	___uchar2fs
	MOVWF	r0x00
	MOVFF	PRODL, r0x02
	MOVFF	PRODH, r0x03
	MOVFF	FSR0L, r0x04
	INCF	FSR1L, F
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	MOVLW	0x42
	MOVWF	POSTDEC1
	MOVLW	0xd5
	MOVWF	POSTDEC1
	MOVLW	0x51
	MOVWF	POSTDEC1
	MOVLW	0xec
	MOVWF	POSTDEC1
	CALL	___fsmul
	MOVWF	r0x00
	MOVFF	PRODL, r0x02
	MOVFF	PRODH, r0x03
	MOVFF	FSR0L, r0x04
	MOVLW	0x08
	ADDWF	FSR1L, F
	MOVLW	0x46
	MOVWF	POSTDEC1
	MOVLW	0x03
	MOVWF	POSTDEC1
	MOVLW	0x3c
	MOVWF	POSTDEC1
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	___fsadd
	MOVWF	r0x00
	MOVFF	PRODL, r0x02
	MOVFF	PRODH, r0x03
	MOVFF	FSR0L, r0x04
	MOVLW	0x08
	ADDWF	FSR1L, F
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	___fs2uint
	MOVWF	r0x00
	MOVFF	PRODL, r0x02
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	392; timer1.c	if(posF>posI){
	MOVF	r0x02, W
	BANKSEL	(_posI + 1)
	SUBWF	(_posI + 1), W, B
	BNZ	_00496_DS_
	MOVF	r0x00, W
	BANKSEL	_posI
	SUBWF	_posI, W, B
_00496_DS_:
	BC	_00448_DS_
	BANKSEL	_posI
	.line	393; timer1.c	vueltas = posF - posI;
	MOVF	_posI, W, B
	SUBWF	r0x00, W
	MOVWF	r0x03
	BANKSEL	(_posI + 1)
	MOVF	(_posI + 1), W, B
	SUBWFB	r0x02, W
	MOVWF	r0x04
	.line	394; timer1.c	vueltas = vueltas / vel;
	MOVFF	r0x01, r0x05
	CLRF	r0x06
	MOVF	r0x06, W
	MOVWF	POSTDEC1
	MOVF	r0x05, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	__divuint
	MOVWF	r0x03
	MOVFF	PRODL, r0x04
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	395; timer1.c	DerIzq = 1;
	MOVLW	0x01
	MOVWF	r0x05
	BRA	_00449_DS_
_00448_DS_:
	.line	399; timer1.c	vueltas = posI - posF;
	MOVF	r0x00, W
	BANKSEL	_posI
	SUBWF	_posI, W, B
	MOVWF	r0x03
	MOVF	r0x02, W
	BANKSEL	(_posI + 1)
	SUBWFB	(_posI + 1), W, B
	MOVWF	r0x04
	.line	400; timer1.c	vueltas = vueltas/ vel;
	MOVFF	r0x01, r0x00
	CLRF	r0x02
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	__divuint
	MOVWF	r0x03
	MOVFF	PRODL, r0x04
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	401; timer1.c	DerIzq = 0;
	CLRF	r0x05
_00449_DS_:
	.line	414; timer1.c	if(DerIzq)
	MOVF	r0x05, W
	BTFSC	STATUS, 2
	BRA	_00465_DS_
	.line	416; timer1.c	switch(servo[0])
	MOVFF	_command_process_servo_1_1, r0x00
	MOVLW	0x61
	SUBWF	r0x00, W
	BTFSS	STATUS, 0
	BRA	_00455_DS_
	MOVLW	0x66
	SUBWF	r0x00, W
	BTFSC	STATUS, 0
	BRA	_00455_DS_
	MOVLW	0x9f
	ADDWF	r0x00, F
	MOVFF	r0x07, POSTDEC1
	MOVFF	r0x08, POSTDEC1
	CLRF	r0x08
	RLCF	r0x00, W
	RLCF	r0x08, F
	RLCF	WREG, W
	RLCF	r0x08, F
	ANDLW	0xfc
	MOVWF	r0x07
	MOVLW	UPPER(_00499_DS_)
	MOVWF	PCLATU
	MOVLW	HIGH(_00499_DS_)
	MOVWF	PCLATH
	MOVLW	LOW(_00499_DS_)
	ADDWF	r0x07, F
	MOVF	r0x08, W
	ADDWFC	PCLATH, F
	BTFSC	STATUS, 0
	INCF	PCLATU, F
	MOVF	r0x07, W
	MOVFF	PREINC1, r0x08
	MOVFF	PREINC1, r0x07
	MOVWF	PCL
_00499_DS_:
	GOTO	_00450_DS_
	GOTO	_00451_DS_
	GOTO	_00452_DS_
	GOTO	_00453_DS_
	GOTO	_00454_DS_
_00450_DS_:
	.line	419; timer1.c	turnPlus(vueltas, vel, 0);
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnPlus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	420; timer1.c	break;
	BRA	_00466_DS_
_00451_DS_:
	.line	422; timer1.c	turnPlus(vueltas, vel, 1);
	MOVLW	0x01
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnPlus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	423; timer1.c	break;
	BRA	_00466_DS_
_00452_DS_:
	.line	427; timer1.c	turnPlus(vueltas, vel, 2);
	MOVLW	0x02
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnPlus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	428; timer1.c	break;
	BRA	_00466_DS_
_00453_DS_:
	.line	431; timer1.c	turnPlus(vueltas, vel, 3);
	MOVLW	0x03
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnPlus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	432; timer1.c	break;
	BRA	_00466_DS_
_00454_DS_:
	.line	435; timer1.c	turnPlus(vueltas, vel, 4);
	MOVLW	0x04
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnPlus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	436; timer1.c	break;
	BRA	_00466_DS_
_00455_DS_:
	.line	438; timer1.c	Print_str("1"); Printf(INTRO); //Error 1 turnPlusError
	MOVLW	UPPER(__str_4)
	MOVWF	POSTDEC1
	MOVLW	HIGH(__str_4)
	MOVWF	POSTDEC1
	MOVLW	LOW(__str_4)
	MOVWF	POSTDEC1
	CALL	_Print_str
	MOVLW	0x03
	ADDWF	FSR1L, F
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	439; timer1.c	}
	BRA	_00466_DS_
_00465_DS_:
	.line	442; timer1.c	switch(servo[0])
	MOVFF	_command_process_servo_1_1, r0x00
	MOVLW	0x61
	SUBWF	r0x00, W
	BTFSS	STATUS, 0
	BRA	_00462_DS_
	MOVLW	0x66
	SUBWF	r0x00, W
	BTFSC	STATUS, 0
	BRA	_00462_DS_
	MOVLW	0x9f
	ADDWF	r0x00, F
	MOVFF	r0x07, POSTDEC1
	MOVFF	r0x08, POSTDEC1
	CLRF	r0x08
	RLCF	r0x00, W
	RLCF	r0x08, F
	RLCF	WREG, W
	RLCF	r0x08, F
	ANDLW	0xfc
	MOVWF	r0x07
	MOVLW	UPPER(_00502_DS_)
	MOVWF	PCLATU
	MOVLW	HIGH(_00502_DS_)
	MOVWF	PCLATH
	MOVLW	LOW(_00502_DS_)
	ADDWF	r0x07, F
	MOVF	r0x08, W
	ADDWFC	PCLATH, F
	BTFSC	STATUS, 0
	INCF	PCLATU, F
	MOVF	r0x07, W
	MOVFF	PREINC1, r0x08
	MOVFF	PREINC1, r0x07
	MOVWF	PCL
_00502_DS_:
	GOTO	_00457_DS_
	GOTO	_00458_DS_
	GOTO	_00459_DS_
	GOTO	_00460_DS_
	GOTO	_00461_DS_
_00457_DS_:
	.line	445; timer1.c	turnMinus(vueltas,vel,0);
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnMinus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	447; timer1.c	break;
	BRA	_00466_DS_
_00458_DS_:
	.line	449; timer1.c	turnMinus(vueltas,vel,1);
	MOVLW	0x01
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnMinus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	450; timer1.c	break;
	BRA	_00466_DS_
_00459_DS_:
	.line	452; timer1.c	turnMinus(vueltas,vel,2);
	MOVLW	0x02
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnMinus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	453; timer1.c	break;
	BRA	_00466_DS_
_00460_DS_:
	.line	455; timer1.c	turnMinus(vueltas,vel,3);
	MOVLW	0x03
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnMinus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	456; timer1.c	break;
	BRA	_00466_DS_
_00461_DS_:
	.line	458; timer1.c	turnMinus(vueltas,vel,4);
	MOVLW	0x04
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_turnMinus
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	459; timer1.c	break;
	BRA	_00466_DS_
_00462_DS_:
	.line	461; timer1.c	Print_str("2");Printf(INTRO); // error 2 turnMinus Error
	MOVLW	UPPER(__str_5)
	MOVWF	POSTDEC1
	MOVLW	HIGH(__str_5)
	MOVWF	POSTDEC1
	MOVLW	LOW(__str_5)
	MOVWF	POSTDEC1
	CALL	_Print_str
	MOVLW	0x03
	ADDWF	FSR1L, F
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
_00466_DS_:
	.line	464; timer1.c	initBuff();
	CALL	_initBuff
	.line	465; timer1.c	Print_str("ok");Printf(INTRO);
	MOVLW	UPPER(__str_6)
	MOVWF	POSTDEC1
	MOVLW	HIGH(__str_6)
	MOVWF	POSTDEC1
	MOVLW	LOW(__str_6)
	MOVWF	POSTDEC1
	CALL	_Print_str
	MOVLW	0x03
	ADDWF	FSR1L, F
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	MOVFF	PREINC1, r0x06
	MOVFF	PREINC1, r0x05
	MOVFF	PREINC1, r0x04
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__echosel	code
_echosel:
	.line	301; timer1.c	void echosel(char c)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	.line	303; timer1.c	switch(c){
	MOVF	r0x00, W
	XORLW	0x08
	BZ	_00420_DS_
	MOVF	r0x00, W
	XORLW	0x0d
	BZ	_00419_DS_
	MOVF	r0x00, W
	XORLW	0x1b
	BZ	_00421_DS_
	BRA	_00422_DS_
_00419_DS_:
	.line	305; timer1.c	Printf(INTRO);
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	306; timer1.c	break;
	BRA	_00424_DS_
_00420_DS_:
	.line	308; timer1.c	Printf(RETROCESO);
	MOVLW	0x08
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	309; timer1.c	break;
	BRA	_00424_DS_
_00421_DS_:
	.line	311; timer1.c	Printf(ESCAPE);
	MOVLW	0x1b
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	312; timer1.c	break;
	BRA	_00424_DS_
_00422_DS_:
	.line	314; timer1.c	Printf(c); //Echo de cualquier otro caracter
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
_00424_DS_:
	.line	315; timer1.c	}
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__add2cbuff	code
_add2cbuff:
	.line	276; timer1.c	void add2cbuff(unsigned char c)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	.line	278; timer1.c	if(xbuff<lenbuff){  //Añade caracteres al buffer mientras no se llene el buffer
	MOVLW	0x0a
	BANKSEL	_xbuff
	SUBWF	_xbuff, W, B
	BC	_00399_DS_
	.line	279; timer1.c	switch(c){
	MOVF	r0x00, W
	XORLW	0x08
	BZ	_00392_DS_
	MOVF	r0x00, W
	XORLW	0x0d
	BZ	_00391_DS_
	MOVF	r0x00, W
	XORLW	0x1b
	BZ	_00395_DS_
	BRA	_00396_DS_
_00391_DS_:
	.line	281; timer1.c	flagcommand=true;
	MOVLW	0x01
	BANKSEL	_flagcommand
	MOVWF	_flagcommand, B
	.line	282; timer1.c	break;
	BRA	_00401_DS_
_00392_DS_:
	BANKSEL	_xbuff
	.line	284; timer1.c	if(xbuff>0) cbuff[--xbuff]=0x00;
	MOVF	_xbuff, W, B
	BZ	_00401_DS_
	BANKSEL	_xbuff
	DECF	_xbuff, F, B
	MOVLW	LOW(_cbuff)
	BANKSEL	_xbuff
	ADDWF	_xbuff, W, B
	MOVWF	r0x01
	CLRF	r0x02
	MOVLW	HIGH(_cbuff)
	ADDWFC	r0x02, F
	MOVFF	r0x01, FSR0L
	MOVFF	r0x02, FSR0H
	MOVLW	0x00
	MOVWF	INDF0
	.line	285; timer1.c	break;
	BRA	_00401_DS_
_00395_DS_:
	.line	287; timer1.c	initBuff();
	CALL	_initBuff
	.line	288; timer1.c	break;
	BRA	_00401_DS_
_00396_DS_:
	.line	290; timer1.c	cbuff[xbuff++]=c;
	MOVFF	_xbuff, r0x01
	BANKSEL	_xbuff
	INCF	_xbuff, F, B
	CLRF	r0x02
	MOVLW	LOW(_cbuff)
	ADDWF	r0x01, F
	MOVLW	HIGH(_cbuff)
	ADDWFC	r0x02, F
	MOVFF	r0x01, FSR0L
	MOVFF	r0x02, FSR0H
	MOVFF	r0x00, INDF0
	.line	291; timer1.c	}
	BRA	_00401_DS_
_00399_DS_:
	.line	294; timer1.c	initBuff();//Si el buffer esta lleno, vacialo
	CALL	_initBuff
	.line	295; timer1.c	Print_str("0");  //Envia mensaje de que el buffer esta lleno Error 0
	MOVLW	UPPER(__str_2)
	MOVWF	POSTDEC1
	MOVLW	HIGH(__str_2)
	MOVWF	POSTDEC1
	MOVLW	LOW(__str_2)
	MOVWF	POSTDEC1
	CALL	_Print_str
	MOVLW	0x03
	ADDWF	FSR1L, F
	.line	296; timer1.c	Printf(INTRO);
	MOVLW	0x0d
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
_00401_DS_:
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__initBuff	code
_initBuff:
	.line	268; timer1.c	void initBuff(void){
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	.line	270; timer1.c	for (i=0; i< lenbuff;i++){
	CLRF	r0x00
	CLRF	r0x01
_00377_DS_:
	MOVF	r0x01, W
	ADDLW	0x80
	ADDLW	0x80
	BNZ	_00386_DS_
	MOVLW	0x0a
	SUBWF	r0x00, W
_00386_DS_:
	BC	_00380_DS_
	.line	271; timer1.c	cbuff[i]=0x0;
	MOVLW	LOW(_cbuff)
	ADDWF	r0x00, W
	MOVWF	r0x02
	MOVLW	HIGH(_cbuff)
	ADDWFC	r0x01, W
	MOVWF	r0x03
	MOVFF	r0x02, FSR0L
	MOVFF	r0x03, FSR0H
	MOVLW	0x00
	MOVWF	INDF0
	.line	270; timer1.c	for (i=0; i< lenbuff;i++){
	INCF	r0x00, F
	BTFSC	STATUS, 0
	INCF	r0x01, F
	BRA	_00377_DS_
_00380_DS_:
	BANKSEL	_xbuff
	.line	272; timer1.c	}xbuff=0x00;
	CLRF	_xbuff, B
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__Tmr1Carga	code
_Tmr1Carga:
	.line	261; timer1.c	void Tmr1Carga(unsigned char high, unsigned char low)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVLW	0x02
	MOVFF	PLUSW2, _TMR1H
	MOVLW	0x03
	MOVFF	PLUSW2, _TMR1L
	.line	264; timer1.c	TMR1L=low;
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__EnableTimer1Interrupt	code
_EnableTimer1Interrupt:
	.line	253; timer1.c	void EnableTimer1Interrupt(void)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	.line	255; timer1.c	T1CON=1;        //Timer1 preescaler 1 interno, carga de 8 bits
	MOVLW	0x01
	MOVWF	_T1CON
	.line	256; timer1.c	PIE1bits.TMR1IE=1;
	BSF	_PIE1bits, 0
	.line	257; timer1.c	INTCONbits.PEIE=1;
	BSF	_INTCONbits, 6
	.line	258; timer1.c	INTCONbits.GIE=1;
	BSF	_INTCONbits, 7
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__init_board	code
_init_board:
	.line	234; timer1.c	void init_board(void) {
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	BANKSEL	_flagcommand
	.line	235; timer1.c	flagcommand= false;
	CLRF	_flagcommand, B
	.line	236; timer1.c	ADCON1=0x7; // PORTA used for digital I/O
	MOVLW	0x07
	MOVWF	_ADCON1
	.line	237; timer1.c	TRISAbits.TRISA4=true; // configure PORTA4 for input (pushbutton)
	BSF	_TRISAbits, 4
	.line	240; timer1.c	CSERVO1 = false;
	BCF	_TRISBbits, 0
	.line	241; timer1.c	CSERVO2 = false;
	BCF	_TRISBbits, 1
	.line	242; timer1.c	CSERVO3 = false;
	BCF	_TRISBbits, 2
	.line	243; timer1.c	CSERVO4 = false;
	BCF	_TRISBbits, 3
	.line	244; timer1.c	CSERVO5 = false;
	BCF	_TRISBbits, 4
	.line	245; timer1.c	CSERVO6 = false;
	BCF	_TRISBbits, 5
	.line	246; timer1.c	CSERVO7 = false;
	BCF	_TRISBbits, 6
	.line	247; timer1.c	CSERVO8 = false;
	BCF	_TRISBbits, 7
	.line	250; timer1.c	setup_UART(B57600);
	MOVLW	0xcf
	MOVWF	POSTDEC1
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x01
	MOVWF	POSTDEC1
	MOVLW	0x01
	MOVWF	POSTDEC1
	CALL	_setup_UART
	MOVLW	0x04
	ADDWF	FSR1L, F
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__isr_Serial	code
_isr_Serial:
	.line	185; timer1.c	static void isr_Serial() interrupt 2  //Esta es una interrupcion de baja prioridad
	MOVFF	WREG, POSTDEC1
	MOVFF	STATUS, POSTDEC1
	MOVFF	BSR, POSTDEC1
	MOVFF	PRODL, POSTDEC1
	MOVFF	PRODH, POSTDEC1
	MOVFF	FSR0L, POSTDEC1
	MOVFF	FSR0H, POSTDEC1
	MOVFF	PCLATH, POSTDEC1
	MOVFF	PCLATU, POSTDEC1
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	.line	187; timer1.c	PIR1bits.RCIF=0;
	BCF	_PIR1bits, 5
	.line	188; timer1.c	rcvchar=RCREG;
	MOVFF	_RCREG, _rcvchar
	.line	189; timer1.c	add2cbuff(rcvchar);
	MOVFF	_rcvchar, r0x00
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_add2cbuff
	INCF	FSR1L, F
	BANKSEL	_rcvchar
	.line	190; timer1.c	echosel(rcvchar);
	MOVF	_rcvchar, W, B
	MOVWF	POSTDEC1
	CALL	_echosel
	INCF	FSR1L, F
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	MOVFF	PREINC1, PCLATU
	MOVFF	PREINC1, PCLATH
	MOVFF	PREINC1, FSR0H
	MOVFF	PREINC1, FSR0L
	MOVFF	PREINC1, PRODH
	MOVFF	PREINC1, PRODL
	MOVFF	PREINC1, BSR
	MOVFF	PREINC1, STATUS
	MOVFF	PREINC1, WREG
	RETFIE	

; ; Starting pCode block
S_timer1__isr_Tmr1	code
_isr_Tmr1:
	.line	132; timer1.c	static void isr_Tmr1() interrupt 1    //Esta es una interrupcion de alta prioridad
	MOVFF	WREG, POSTDEC1
	MOVFF	STATUS, POSTDEC1
	MOVFF	BSR, POSTDEC1
	MOVFF	PRODL, POSTDEC1
	MOVFF	PRODH, POSTDEC1
	MOVFF	FSR0L, POSTDEC1
	MOVFF	FSR0H, POSTDEC1
	MOVFF	PCLATH, POSTDEC1
	MOVFF	PCLATU, POSTDEC1
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVFF	r0x04, POSTDEC1
	MOVFF	r0x05, POSTDEC1
	.line	134; timer1.c	PIE1bits.RCIE=0;  //deshabilitamos la interrupcion del puerto serie
	BCF	_PIE1bits, 5
	BANKSEL	_flag_Phase
	.line	135; timer1.c	if(flag_Phase == 1)
	MOVF	_flag_Phase, W, B
	XORLW	0x01
	BZ	_00300_DS_
	BRA	_00226_DS_
_00300_DS_:
	BANKSEL	_Servo_Idx
	.line	137; timer1.c	if(Servo_Idx == 0 && SERVO1_ON) {SERVO1 = 1;}
	MOVF	_Servo_Idx, W, B
	BANKSEL	(_Servo_Idx + 1)
	IORWF	(_Servo_Idx + 1), W, B
	BNZ	_00202_DS_
	BANKSEL	_SERVO1_ON
	MOVF	_SERVO1_ON, W, B
	BZ	_00202_DS_
	BSF	_LATBbits, 0
_00202_DS_:
	BANKSEL	_Servo_Idx
	.line	138; timer1.c	if(Servo_Idx == 1 && SERVO2_ON) {SERVO2 = 1;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x01
	BNZ	_00301_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00302_DS_
_00301_DS_:
	BRA	_00205_DS_
_00302_DS_:
	BANKSEL	_SERVO2_ON
	MOVF	_SERVO2_ON, W, B
	BZ	_00205_DS_
	BSF	_LATBbits, 1
_00205_DS_:
	BANKSEL	_Servo_Idx
	.line	139; timer1.c	if(Servo_Idx == 2 && SERVO3_ON) {SERVO3 = 1;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x02
	BNZ	_00303_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00304_DS_
_00303_DS_:
	BRA	_00208_DS_
_00304_DS_:
	BANKSEL	_SERVO3_ON
	MOVF	_SERVO3_ON, W, B
	BZ	_00208_DS_
	BSF	_LATBbits, 2
_00208_DS_:
	BANKSEL	_Servo_Idx
	.line	140; timer1.c	if(Servo_Idx == 3 && SERVO4_ON) {SERVO4 = 1;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x03
	BNZ	_00305_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00306_DS_
_00305_DS_:
	BRA	_00211_DS_
_00306_DS_:
	BANKSEL	_SERVO4_ON
	MOVF	_SERVO4_ON, W, B
	BZ	_00211_DS_
	BSF	_LATBbits, 3
_00211_DS_:
	BANKSEL	_Servo_Idx
	.line	141; timer1.c	if(Servo_Idx == 4 && SERVO5_ON) {SERVO5 = 1;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x04
	BNZ	_00307_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00308_DS_
_00307_DS_:
	BRA	_00214_DS_
_00308_DS_:
	BANKSEL	_SERVO5_ON
	MOVF	_SERVO5_ON, W, B
	BZ	_00214_DS_
	BSF	_LATBbits, 4
_00214_DS_:
	BANKSEL	_Servo_Idx
	.line	142; timer1.c	if(Servo_Idx == 5 && SERVO6_ON) {SERVO6 = 1;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x05
	BNZ	_00309_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00310_DS_
_00309_DS_:
	BRA	_00217_DS_
_00310_DS_:
	BANKSEL	_SERVO6_ON
	MOVF	_SERVO6_ON, W, B
	BZ	_00217_DS_
	BSF	_LATBbits, 5
_00217_DS_:
	BANKSEL	_Servo_Idx
	.line	143; timer1.c	if(Servo_Idx == 6 && SERVO7_ON) {SERVO7 = 1;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x06
	BNZ	_00311_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00312_DS_
_00311_DS_:
	BRA	_00220_DS_
_00312_DS_:
	BANKSEL	_SERVO7_ON
	MOVF	_SERVO7_ON, W, B
	BZ	_00220_DS_
	BSF	_LATBbits, 6
_00220_DS_:
	BANKSEL	_Servo_Idx
	.line	144; timer1.c	if(Servo_Idx == 7 && SERVO8_ON) {SERVO8 = 1;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x07
	BNZ	_00313_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00314_DS_
_00313_DS_:
	BRA	_00223_DS_
_00314_DS_:
	BANKSEL	_SERVO8_ON
	MOVF	_SERVO8_ON, W, B
	BZ	_00223_DS_
	BSF	_LATBbits, 7
_00223_DS_:
	BANKSEL	(_Servo_Idx + 1)
	.line	145; timer1.c	Ticks4NextInterruptH = 0xFF - Servo_PWMH[Servo_Idx];
	MOVF	(_Servo_Idx + 1), W, B
	MOVWF	POSTDEC1
	BANKSEL	_Servo_Idx
	MOVF	_Servo_Idx, W, B
	MOVWF	POSTDEC1
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x02
	MOVWF	POSTDEC1
	CALL	__mulint
	MOVWF	r0x00
	MOVFF	PRODL, r0x01
	MOVLW	0x04
	ADDWF	FSR1L, F
	MOVLW	LOW(_Servo_PWMH)
	ADDWF	r0x00, W
	MOVWF	r0x02
	MOVLW	HIGH(_Servo_PWMH)
	ADDWFC	r0x01, W
	MOVWF	r0x03
	MOVFF	r0x02, FSR0L
	MOVFF	r0x03, FSR0H
	MOVFF	POSTINC0, r0x02
	MOVFF	INDF0, r0x03
	MOVF	r0x02, W
	SUBLW	0xff
	BANKSEL	_Ticks4NextInterruptH
	MOVWF	_Ticks4NextInterruptH, B
	MOVLW	0x00
	SUBFWB	r0x03, W
	BANKSEL	(_Ticks4NextInterruptH + 1)
	MOVWF	(_Ticks4NextInterruptH + 1), B
	.line	146; timer1.c	Ticks4NextInterruptL = 0xFF - Servo_PWML[Servo_Idx];
	MOVLW	LOW(_Servo_PWML)
	ADDWF	r0x00, F
	MOVLW	HIGH(_Servo_PWML)
	ADDWFC	r0x01, F
	MOVFF	r0x00, FSR0L
	MOVFF	r0x01, FSR0H
	MOVFF	POSTINC0, r0x00
	MOVFF	INDF0, r0x01
	MOVF	r0x00, W
	SUBLW	0xff
	BANKSEL	_Ticks4NextInterruptL
	MOVWF	_Ticks4NextInterruptL, B
	MOVLW	0x00
	SUBFWB	r0x01, W
	BANKSEL	(_Ticks4NextInterruptL + 1)
	MOVWF	(_Ticks4NextInterruptL + 1), B
	BANKSEL	_Ticks4NextInterruptH
	.line	147; timer1.c	Tmr1Carga(Ticks4NextInterruptH,Ticks4NextInterruptL);
	MOVF	_Ticks4NextInterruptH, W, B
	MOVWF	r0x00
	BANKSEL	_Ticks4NextInterruptL
	MOVF	_Ticks4NextInterruptL, W, B
	MOVWF	r0x01
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_Tmr1Carga
	MOVLW	0x02
	ADDWF	FSR1L, F
_00226_DS_:
	BANKSEL	_flag_Phase
	.line	150; timer1.c	if(flag_Phase == 0)
	MOVF	_flag_Phase, W, B
	BTFSS	STATUS, 2
	BRA	_00257_DS_
	BANKSEL	_Servo_Idx
	.line	152; timer1.c	if(Servo_Idx == 0 && SERVO1_ON) {SERVO1 = 0;}
	MOVF	_Servo_Idx, W, B
	BANKSEL	(_Servo_Idx + 1)
	IORWF	(_Servo_Idx + 1), W, B
	BNZ	_00228_DS_
	BANKSEL	_SERVO1_ON
	MOVF	_SERVO1_ON, W, B
	BZ	_00228_DS_
	BCF	_LATBbits, 0
_00228_DS_:
	BANKSEL	_Servo_Idx
	.line	153; timer1.c	if(Servo_Idx == 1 && SERVO2_ON) {SERVO2 = 0;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x01
	BNZ	_00315_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00316_DS_
_00315_DS_:
	BRA	_00231_DS_
_00316_DS_:
	BANKSEL	_SERVO2_ON
	MOVF	_SERVO2_ON, W, B
	BZ	_00231_DS_
	BCF	_LATBbits, 1
_00231_DS_:
	BANKSEL	_Servo_Idx
	.line	154; timer1.c	if(Servo_Idx == 2 && SERVO3_ON) {SERVO3 = 0;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x02
	BNZ	_00317_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00318_DS_
_00317_DS_:
	BRA	_00234_DS_
_00318_DS_:
	BANKSEL	_SERVO3_ON
	MOVF	_SERVO3_ON, W, B
	BZ	_00234_DS_
	BCF	_LATBbits, 2
_00234_DS_:
	BANKSEL	_Servo_Idx
	.line	155; timer1.c	if(Servo_Idx == 3 && SERVO4_ON) {SERVO4 = 0;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x03
	BNZ	_00319_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00320_DS_
_00319_DS_:
	BRA	_00237_DS_
_00320_DS_:
	BANKSEL	_SERVO4_ON
	MOVF	_SERVO4_ON, W, B
	BZ	_00237_DS_
	BCF	_LATBbits, 3
_00237_DS_:
	BANKSEL	_Servo_Idx
	.line	156; timer1.c	if(Servo_Idx == 4 && SERVO5_ON) {SERVO5 = 0;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x04
	BNZ	_00321_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00322_DS_
_00321_DS_:
	BRA	_00240_DS_
_00322_DS_:
	BANKSEL	_SERVO5_ON
	MOVF	_SERVO5_ON, W, B
	BZ	_00240_DS_
	BCF	_LATBbits, 4
_00240_DS_:
	BANKSEL	_Servo_Idx
	.line	157; timer1.c	if(Servo_Idx == 5 && SERVO6_ON) {SERVO6 = 0;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x05
	BNZ	_00323_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00324_DS_
_00323_DS_:
	BRA	_00243_DS_
_00324_DS_:
	BANKSEL	_SERVO6_ON
	MOVF	_SERVO6_ON, W, B
	BZ	_00243_DS_
	BCF	_LATBbits, 5
_00243_DS_:
	BANKSEL	_Servo_Idx
	.line	158; timer1.c	if(Servo_Idx == 6 && SERVO7_ON) {SERVO7 = 0;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x06
	BNZ	_00325_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00326_DS_
_00325_DS_:
	BRA	_00246_DS_
_00326_DS_:
	BANKSEL	_SERVO7_ON
	MOVF	_SERVO7_ON, W, B
	BZ	_00246_DS_
	BCF	_LATBbits, 6
_00246_DS_:
	BANKSEL	_Servo_Idx
	.line	159; timer1.c	if(Servo_Idx == 7 && SERVO8_ON) {SERVO8 = 0;}
	MOVF	_Servo_Idx, W, B
	XORLW	0x07
	BNZ	_00327_DS_
	BANKSEL	(_Servo_Idx + 1)
	MOVF	(_Servo_Idx + 1), W, B
	BZ	_00328_DS_
_00327_DS_:
	BRA	_00249_DS_
_00328_DS_:
	BANKSEL	_SERVO8_ON
	MOVF	_SERVO8_ON, W, B
	BZ	_00249_DS_
	BCF	_LATBbits, 7
_00249_DS_:
	.line	160; timer1.c	Ticks4NextInterruptH = 0xFF - Ticks4WindowH;
	MOVLW	LOW(_Ticks4WindowH)
	MOVWF	TBLPTRL
	MOVLW	HIGH(_Ticks4WindowH)
	MOVWF	TBLPTRH
	MOVLW	UPPER(_Ticks4WindowH)
	MOVWF	TBLPTRU
	TBLRD*+	
	MOVFF	TABLAT, r0x00
	TBLRD*+	
	MOVFF	TABLAT, r0x01
	MOVF	r0x00, W
	SUBLW	0xff
	BANKSEL	_Ticks4NextInterruptH
	MOVWF	_Ticks4NextInterruptH, B
	MOVLW	0x00
	SUBFWB	r0x01, W
	BANKSEL	(_Ticks4NextInterruptH + 1)
	MOVWF	(_Ticks4NextInterruptH + 1), B
	.line	161; timer1.c	Ticks4NextInterruptL = 0xFF - Ticks4WindowL;
	MOVLW	LOW(_Ticks4WindowL)
	MOVWF	TBLPTRL
	MOVLW	HIGH(_Ticks4WindowL)
	MOVWF	TBLPTRH
	MOVLW	UPPER(_Ticks4WindowL)
	MOVWF	TBLPTRU
	TBLRD*+	
	MOVFF	TABLAT, r0x00
	TBLRD*+	
	MOVFF	TABLAT, r0x01
	MOVF	r0x00, W
	SUBLW	0xff
	BANKSEL	_Ticks4NextInterruptL
	MOVWF	_Ticks4NextInterruptL, B
	MOVLW	0x00
	SUBFWB	r0x01, W
	BANKSEL	(_Ticks4NextInterruptL + 1)
	MOVWF	(_Ticks4NextInterruptL + 1), B
	BANKSEL	(_Servo_Idx + 1)
	.line	163; timer1.c	if(Ticks4NextInterruptL + Servo_PWML[Servo_Idx] > 0xFF)
	MOVF	(_Servo_Idx + 1), W, B
	MOVWF	POSTDEC1
	BANKSEL	_Servo_Idx
	MOVF	_Servo_Idx, W, B
	MOVWF	POSTDEC1
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x02
	MOVWF	POSTDEC1
	CALL	__mulint
	MOVWF	r0x00
	MOVFF	PRODL, r0x01
	MOVLW	0x04
	ADDWF	FSR1L, F
	MOVLW	LOW(_Servo_PWML)
	ADDWF	r0x00, W
	MOVWF	r0x02
	MOVLW	HIGH(_Servo_PWML)
	ADDWFC	r0x01, W
	MOVWF	r0x03
	MOVFF	r0x02, FSR0L
	MOVFF	r0x03, FSR0H
	MOVFF	POSTINC0, r0x02
	MOVFF	INDF0, r0x03
	BANKSEL	_Ticks4NextInterruptL
	MOVF	_Ticks4NextInterruptL, W, B
	ADDWF	r0x02, F
	BANKSEL	(_Ticks4NextInterruptL + 1)
	MOVF	(_Ticks4NextInterruptL + 1), W, B
	ADDWFC	r0x03, F
	MOVLW	0x01
	SUBWF	r0x03, W
	BNZ	_00329_DS_
	MOVLW	0x00
	SUBWF	r0x02, W
_00329_DS_:
	BNC	_00252_DS_
	.line	165; timer1.c	Ticks4NextInterruptL = Ticks4NextInterruptL + Servo_PWML[Servo_Idx];
	MOVFF	r0x02, _Ticks4NextInterruptL
	MOVFF	r0x03, (_Ticks4NextInterruptL + 1)
	.line	166; timer1.c	Ticks4NextInterruptH = Ticks4NextInterruptH + Servo_PWMH[Servo_Idx] + 1;
	MOVLW	LOW(_Servo_PWMH)
	ADDWF	r0x00, W
	MOVWF	r0x04
	MOVLW	HIGH(_Servo_PWMH)
	ADDWFC	r0x01, W
	MOVWF	r0x05
	MOVFF	r0x04, FSR0L
	MOVFF	r0x05, FSR0H
	MOVFF	POSTINC0, r0x04
	MOVFF	INDF0, r0x05
	BANKSEL	_Ticks4NextInterruptH
	MOVF	_Ticks4NextInterruptH, W, B
	ADDWF	r0x04, F
	BANKSEL	(_Ticks4NextInterruptH + 1)
	MOVF	(_Ticks4NextInterruptH + 1), W, B
	ADDWFC	r0x05, F
	MOVF	r0x04, W
	ADDLW	0x01
	BANKSEL	_Ticks4NextInterruptH
	MOVWF	_Ticks4NextInterruptH, B
	MOVLW	0x00
	ADDWFC	r0x05, W
	BANKSEL	(_Ticks4NextInterruptH + 1)
	MOVWF	(_Ticks4NextInterruptH + 1), B
	BRA	_00253_DS_
_00252_DS_:
	.line	170; timer1.c	Ticks4NextInterruptL = Ticks4NextInterruptL + Servo_PWML[Servo_Idx];
	MOVFF	r0x02, _Ticks4NextInterruptL
	MOVFF	r0x03, (_Ticks4NextInterruptL + 1)
	.line	171; timer1.c	Ticks4NextInterruptH = Ticks4NextInterruptH + Servo_PWMH[Servo_Idx];
	MOVLW	LOW(_Servo_PWMH)
	ADDWF	r0x00, F
	MOVLW	HIGH(_Servo_PWMH)
	ADDWFC	r0x01, F
	MOVFF	r0x00, FSR0L
	MOVFF	r0x01, FSR0H
	MOVFF	POSTINC0, r0x00
	MOVFF	INDF0, r0x01
	MOVF	r0x00, W
	BANKSEL	_Ticks4NextInterruptH
	ADDWF	_Ticks4NextInterruptH, F, B
	MOVF	r0x01, W
	BANKSEL	(_Ticks4NextInterruptH + 1)
	ADDWFC	(_Ticks4NextInterruptH + 1), F, B
_00253_DS_:
	BANKSEL	_Ticks4NextInterruptH
	.line	173; timer1.c	Tmr1Carga(Ticks4NextInterruptH, Ticks4NextInterruptL);
	MOVF	_Ticks4NextInterruptH, W, B
	MOVWF	r0x00
	BANKSEL	_Ticks4NextInterruptL
	MOVF	_Ticks4NextInterruptL, W, B
	MOVWF	r0x01
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_Tmr1Carga
	MOVLW	0x02
	ADDWF	FSR1L, F
	BANKSEL	_Servo_Idx
	.line	174; timer1.c	if(++Servo_Idx > 7 ) Servo_Idx = 0;
	INCF	_Servo_Idx, F, B
	BNC	_10536_DS_
	BANKSEL	(_Servo_Idx + 1)
	INCF	(_Servo_Idx + 1), F, B
_10536_DS_:
	MOVLW	0x00
	BANKSEL	(_Servo_Idx + 1)
	SUBWF	(_Servo_Idx + 1), W, B
	BNZ	_00330_DS_
	MOVLW	0x08
	BANKSEL	_Servo_Idx
	SUBWF	_Servo_Idx, W, B
_00330_DS_:
	BNC	_00257_DS_
	BANKSEL	_Servo_Idx
	CLRF	_Servo_Idx, B
	BANKSEL	(_Servo_Idx + 1)
	CLRF	(_Servo_Idx + 1), B
_00257_DS_:
	BANKSEL	_flag_Phase
	.line	176; timer1.c	if(++flag_Phase > 1) flag_Phase = 0;
	INCF	_flag_Phase, F, B
	MOVLW	0x02
	BANKSEL	_flag_Phase
	SUBWF	_flag_Phase, W, B
	BNC	_00259_DS_
	BANKSEL	_flag_Phase
	CLRF	_flag_Phase, B
_00259_DS_:
	.line	179; timer1.c	LATBbits.LATB7^=1; //complementamos el valor del bit RB7
	CLRF	r0x00
	BTFSC	_LATBbits, 7
	INCF	r0x00, F
	MOVLW	0x01
	XORWF	r0x00, F
	MOVF	r0x00, W
	ANDLW	0x01
	RRNCF	WREG, W
	MOVWF	PRODH
	MOVF	_LATBbits, W
	ANDLW	0x7f
	IORWF	PRODH, W
	MOVWF	_LATBbits
	.line	180; timer1.c	PIR1bits.TMR1IF=0; //limpiamos la bandera de interrupcion
	BCF	_PIR1bits, 0
	.line	181; timer1.c	PIE1bits.RCIE=1;   //habilitamos la interrupcion del puerto serie
	BSF	_PIE1bits, 5
	MOVFF	PREINC1, r0x05
	MOVFF	PREINC1, r0x04
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	MOVFF	PREINC1, PCLATU
	MOVFF	PREINC1, PCLATH
	MOVFF	PREINC1, FSR0H
	MOVFF	PREINC1, FSR0L
	MOVFF	PREINC1, PRODH
	MOVFF	PREINC1, PRODL
	MOVFF	PREINC1, BSR
	MOVFF	PREINC1, STATUS
	MOVFF	PREINC1, WREG
	RETFIE	

; ; Starting pCode block
S_timer1__Print_byte	code
_Print_byte:
	.line	188; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void Print_byte(unsigned int valeur)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	.line	192; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(result);
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__Print_hex	code
_Print_hex:
	.line	176; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void Print_hex(unsigned int valeur)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	.line	178; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	const char hexa[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
	MOVLW	0x30
	BANKSEL	_Print_hex_hexa_1_1
	MOVWF	_Print_hex_hexa_1_1, B
	MOVLW	0x31
	BANKSEL	(_Print_hex_hexa_1_1 + 1)
	MOVWF	(_Print_hex_hexa_1_1 + 1), B
	MOVLW	0x32
	BANKSEL	(_Print_hex_hexa_1_1 + 2)
	MOVWF	(_Print_hex_hexa_1_1 + 2), B
	MOVLW	0x33
	BANKSEL	(_Print_hex_hexa_1_1 + 3)
	MOVWF	(_Print_hex_hexa_1_1 + 3), B
	MOVLW	0x34
	BANKSEL	(_Print_hex_hexa_1_1 + 4)
	MOVWF	(_Print_hex_hexa_1_1 + 4), B
	MOVLW	0x35
	BANKSEL	(_Print_hex_hexa_1_1 + 5)
	MOVWF	(_Print_hex_hexa_1_1 + 5), B
	MOVLW	0x36
	BANKSEL	(_Print_hex_hexa_1_1 + 6)
	MOVWF	(_Print_hex_hexa_1_1 + 6), B
	MOVLW	0x37
	BANKSEL	(_Print_hex_hexa_1_1 + 7)
	MOVWF	(_Print_hex_hexa_1_1 + 7), B
	MOVLW	0x38
	BANKSEL	(_Print_hex_hexa_1_1 + 8)
	MOVWF	(_Print_hex_hexa_1_1 + 8), B
	MOVLW	0x39
	BANKSEL	(_Print_hex_hexa_1_1 + 9)
	MOVWF	(_Print_hex_hexa_1_1 + 9), B
	MOVLW	0x41
	BANKSEL	(_Print_hex_hexa_1_1 + 10)
	MOVWF	(_Print_hex_hexa_1_1 + 10), B
	MOVLW	0x42
	BANKSEL	(_Print_hex_hexa_1_1 + 11)
	MOVWF	(_Print_hex_hexa_1_1 + 11), B
	MOVLW	0x43
	BANKSEL	(_Print_hex_hexa_1_1 + 12)
	MOVWF	(_Print_hex_hexa_1_1 + 12), B
	MOVLW	0x44
	BANKSEL	(_Print_hex_hexa_1_1 + 13)
	MOVWF	(_Print_hex_hexa_1_1 + 13), B
	MOVLW	0x45
	BANKSEL	(_Print_hex_hexa_1_1 + 14)
	MOVWF	(_Print_hex_hexa_1_1 + 14), B
	MOVLW	0x46
	BANKSEL	(_Print_hex_hexa_1_1 + 15)
	MOVWF	(_Print_hex_hexa_1_1 + 15), B
	.line	180; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(hexa[(valeur>>12)&0x000F]);
	SWAPF	r0x01, W
	ANDLW	0x0f
	MOVWF	r0x02
	CLRF	r0x03
	MOVLW	0x0f
	ANDWF	r0x02, F
	CLRF	r0x03
	MOVLW	LOW(_Print_hex_hexa_1_1)
	ADDWF	r0x02, F
	MOVLW	HIGH(_Print_hex_hexa_1_1)
	ADDWFC	r0x03, F
	MOVFF	r0x02, FSR0L
	MOVFF	r0x03, FSR0H
	MOVFF	INDF0, r0x02
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	181; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(hexa[(valeur>>8)&0x000F]);
	MOVF	r0x01, W
	MOVWF	r0x02
	CLRF	r0x03
	MOVLW	0x0f
	ANDWF	r0x02, F
	CLRF	r0x03
	MOVLW	LOW(_Print_hex_hexa_1_1)
	ADDWF	r0x02, F
	MOVLW	HIGH(_Print_hex_hexa_1_1)
	ADDWFC	r0x03, F
	MOVFF	r0x02, FSR0L
	MOVFF	r0x03, FSR0H
	MOVFF	INDF0, r0x02
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	182; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(hexa[(valeur>>4)&0x000F]);
	SWAPF	r0x00, W
	ANDLW	0x0f
	MOVWF	r0x02
	SWAPF	r0x01, W
	MOVWF	r0x03
	ANDLW	0xf0
	XORWF	r0x03, F
	ADDWF	r0x02, F
	MOVLW	0x0f
	ANDWF	r0x02, F
	CLRF	r0x03
	MOVLW	LOW(_Print_hex_hexa_1_1)
	ADDWF	r0x02, F
	MOVLW	HIGH(_Print_hex_hexa_1_1)
	ADDWFC	r0x03, F
	MOVFF	r0x02, FSR0L
	MOVFF	r0x03, FSR0H
	MOVFF	INDF0, r0x02
	MOVF	r0x02, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	183; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(hexa[valeur&0x000F]);
	MOVLW	0x0f
	ANDWF	r0x00, F
	CLRF	r0x01
	MOVLW	LOW(_Print_hex_hexa_1_1)
	ADDWF	r0x00, F
	MOVLW	HIGH(_Print_hex_hexa_1_1)
	ADDWFC	r0x01, F
	MOVFF	r0x00, FSR0L
	MOVFF	r0x01, FSR0H
	MOVFF	INDF0, r0x00
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__Print_dec	code
_Print_dec:
	.line	138; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void Print_dec(unsigned int valeur)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVFF	r0x04, POSTDEC1
	MOVFF	r0x05, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	.line	141; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	unsigned char zero=1;
	MOVLW	0x01
	MOVWF	r0x02
	.line	144; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	result=valeur/10000;
	MOVLW	0x27
	MOVWF	POSTDEC1
	MOVLW	0x10
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__divuint
	MOVWF	r0x03
	MOVFF	PRODL, r0x04
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	145; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (result!=0)  {
	MOVF	r0x03, W
	BZ	_00170_DS_
	.line	146; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(result+0x30);
	MOVLW	0x30
	ADDWF	r0x03, W
	MOVWF	r0x04
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	147; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	zero=0;
	CLRF	r0x02
_00170_DS_:
	.line	149; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	valeur=valeur%10000;
	MOVLW	0x27
	MOVWF	POSTDEC1
	MOVLW	0x10
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__moduint
	MOVWF	r0x00
	MOVFF	PRODL, r0x01
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	150; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	result=valeur/1000;
	MOVLW	0x03
	MOVWF	POSTDEC1
	MOVLW	0xe8
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__divuint
	MOVWF	r0x04
	MOVFF	PRODL, r0x05
	MOVLW	0x04
	ADDWF	FSR1L, F
	MOVF	r0x04, W
	MOVWF	r0x03
	.line	151; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (result!=0)  {
	MOVF	r0x03, W
	BZ	_00174_DS_
	.line	152; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(result+0x30);
	MOVLW	0x30
	ADDWF	r0x03, W
	MOVWF	r0x04
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	153; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	zero=0;
	CLRF	r0x02
	BRA	_00175_DS_
_00174_DS_:
	.line	155; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	else if (zero==0) Printf('0');
	MOVF	r0x02, W
	BNZ	_00175_DS_
	MOVLW	0x30
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
_00175_DS_:
	.line	156; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	valeur=valeur%1000;
	MOVLW	0x03
	MOVWF	POSTDEC1
	MOVLW	0xe8
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__moduint
	MOVWF	r0x00
	MOVFF	PRODL, r0x01
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	157; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	result=valeur/100;
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x64
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__divuint
	MOVWF	r0x04
	MOVFF	PRODL, r0x05
	MOVLW	0x04
	ADDWF	FSR1L, F
	MOVF	r0x04, W
	MOVWF	r0x03
	.line	158; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (result!=0)  {
	MOVF	r0x03, W
	BZ	_00179_DS_
	.line	159; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(result+0x30);
	MOVLW	0x30
	ADDWF	r0x03, W
	MOVWF	r0x04
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	160; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	zero=0;
	CLRF	r0x02
	BRA	_00180_DS_
_00179_DS_:
	.line	162; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	else if (zero==0) Printf('0');
	MOVF	r0x02, W
	BNZ	_00180_DS_
	MOVLW	0x30
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
_00180_DS_:
	.line	163; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	valeur=valeur%100;
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x64
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__moduint
	MOVWF	r0x00
	MOVFF	PRODL, r0x01
	MOVLW	0x04
	ADDWF	FSR1L, F
	.line	164; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	result=valeur/10;
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x0a
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__divuint
	MOVWF	r0x04
	MOVFF	PRODL, r0x05
	MOVLW	0x04
	ADDWF	FSR1L, F
	MOVF	r0x04, W
	MOVWF	r0x03
	.line	165; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (result!=0)  {
	MOVF	r0x03, W
	BZ	_00184_DS_
	.line	166; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(result+0x30);
	MOVLW	0x30
	ADDWF	r0x03, W
	MOVWF	r0x04
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	.line	167; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	zero=0;
	BRA	_00185_DS_
_00184_DS_:
	.line	169; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	else if (zero==0) Printf('0');
	MOVF	r0x02, W
	BNZ	_00185_DS_
	MOVLW	0x30
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
_00185_DS_:
	.line	170; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	result=valeur%10;
	MOVLW	0x00
	MOVWF	POSTDEC1
	MOVLW	0x0a
	MOVWF	POSTDEC1
	MOVF	r0x01, W
	MOVWF	POSTDEC1
	MOVF	r0x00, W
	MOVWF	POSTDEC1
	CALL	__moduint
	MOVWF	r0x00
	MOVFF	PRODL, r0x01
	MOVLW	0x04
	ADDWF	FSR1L, F
	MOVF	r0x00, W
	MOVWF	r0x03
	.line	171; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf(result+0x30);
	MOVLW	0x30
	ADDWF	r0x03, F
	MOVF	r0x03, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	MOVFF	PREINC1, r0x05
	MOVFF	PREINC1, r0x04
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__Print_str	code
_Print_str:
	.line	129; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void Print_str(const char* text)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVFF	r0x04, POSTDEC1
	MOVFF	r0x05, POSTDEC1
	MOVFF	r0x06, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	MOVLW	0x04
	MOVFF	PLUSW2, r0x02
	.line	132; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	while ( text[i] != 0 )
	CLRF	r0x03
_00161_DS_:
	MOVF	r0x03, W
	ADDWF	r0x00, W
	MOVWF	r0x04
	CLRF	WREG
	ADDWFC	r0x01, W
	MOVWF	r0x05
	CLRF	WREG
	ADDWFC	r0x02, W
	MOVWF	r0x06
	MOVFF	r0x04, FSR0L
	MOVFF	r0x05, PRODL
	MOVF	r0x06, W
	CALL	__gptrget1
	MOVWF	r0x04
	MOVF	r0x04, W
	BZ	_00164_DS_
	.line	133; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	Printf( text[i++] );
	MOVFF	r0x03, r0x04
	INCF	r0x03, F
	CLRF	r0x05
	CLRF	r0x06
	MOVF	r0x00, W
	ADDWF	r0x04, F
	MOVF	r0x01, W
	ADDWFC	r0x05, F
	MOVF	r0x02, W
	ADDWFC	r0x06, F
	MOVFF	r0x04, FSR0L
	MOVFF	r0x05, PRODL
	MOVF	r0x06, W
	CALL	__gptrget1
	MOVWF	r0x04
	MOVF	r0x04, W
	MOVWF	POSTDEC1
	CALL	_Printf
	INCF	FSR1L, F
	BRA	_00161_DS_
_00164_DS_:
	MOVFF	PREINC1, r0x06
	MOVFF	PREINC1, r0x05
	MOVFF	PREINC1, r0x04
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__clear_buffer	code
_clear_buffer:
	.line	122; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void clear_buffer(void) {
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	.line	123; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	wpointer=1;
	MOVLW	0x01
	BANKSEL	_wpointer
	MOVWF	_wpointer, B
	.line	124; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	rpointer=1;
	MOVLW	0x01
	BANKSEL	_rpointer
	MOVWF	_rpointer, B
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__getch	code
_getch:
	.line	107; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	unsigned char getch()
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	.line	109; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	unsigned char caractere=0;
	CLRF	r0x00
	BANKSEL	_wpointer
	.line	111; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (charreceived)
	MOVF	_wpointer, W, B
	BANKSEL	_rpointer
	XORWF	_rpointer, W, B
	BZ	_00143_DS_
	.line	113; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	caractere=rx[rpointer++];
	MOVFF	_rpointer, r0x01
	BANKSEL	_rpointer
	INCF	_rpointer, F, B
	CLRF	r0x02
	MOVLW	LOW(_rx)
	ADDWF	r0x01, F
	MOVLW	HIGH(_rx)
	ADDWFC	r0x02, F
	MOVFF	r0x01, FSR0L
	MOVFF	r0x02, FSR0H
	MOVFF	INDF0, r0x00
	BANKSEL	_rpointer
	.line	114; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (rpointer==BUFFER)
	MOVF	_rpointer, W, B
	XORLW	0x80
	BNZ	_00143_DS_
	.line	115; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	rpointer=1;
	MOVLW	0x01
	BANKSEL	_rpointer
	MOVWF	_rpointer, B
_00143_DS_:
	.line	117; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	return(caractere);
	MOVF	r0x00, W
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__rxint	code
_rxint:
	.line	85; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void rxint(void)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	.line	90; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	PIR1bits.RCIF=0;                   // clear RX interrupt flag
	BCF	_PIR1bits, 5
	.line	91; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	caractere=RCREG;                   // take received char
	MOVFF	_RCREG, r0x00
	BANKSEL	_wpointer
	.line	92; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (wpointer!=BUFFER-1)            // if not last place in buffer
	MOVF	_wpointer, W, B
	XORLW	0x7f
	BZ	_00119_DS_
_00131_DS_:
	BANKSEL	_wpointer
	.line	93; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	newwp=wpointer+1;               // place=place+1
	INCF	_wpointer, W, B
	MOVWF	r0x01
	BRA	_00120_DS_
_00119_DS_:
	.line	95; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	newwp=1;                        // else place=1
	MOVLW	0x01
	MOVWF	r0x01
_00120_DS_:
	BANKSEL	_rpointer
	.line	97; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (rpointer!=newwp)               // if read pointer!=write pointer
	MOVF	_rpointer, W, B
	XORWF	r0x01, W
	BZ	_00122_DS_
	.line	98; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	rx[wpointer++]=caractere;       // store received char
	MOVFF	_wpointer, r0x01
	BANKSEL	_wpointer
	INCF	_wpointer, F, B
	CLRF	r0x02
	MOVLW	LOW(_rx)
	ADDWF	r0x01, F
	MOVLW	HIGH(_rx)
	ADDWFC	r0x02, F
	MOVFF	r0x01, FSR0L
	MOVFF	r0x02, FSR0H
	MOVFF	r0x00, INDF0
_00122_DS_:
	BANKSEL	_wpointer
	.line	100; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	if (wpointer==BUFFER)              // if write pointer=length buffer
	MOVF	_wpointer, W, B
	XORLW	0x80
	BNZ	_00125_DS_
	.line	101; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	wpointer=1;                    // write pointer = 1
	MOVLW	0x01
	BANKSEL	_wpointer
	MOVWF	_wpointer, B
_00125_DS_:
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__Printf	code
_Printf:
	.line	77; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void Printf(unsigned char caractere)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
_00110_DS_:
	.line	79; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	while (!TXSTAbits.TRMT);
	BTFSS	_TXSTAbits, 1
	BRA	_00110_DS_
	.line	80; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	TXREG=caractere;		        // yes, send char
	MOVFF	r0x00, _TXREG
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block
S_timer1__setup_UART	code
_setup_UART:
	.line	58; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	void setup_UART(unsigned char brg16,unsigned char brgh,unsigned char highbyte,unsigned char lowbyte)
	MOVFF	FSR2L, POSTDEC1
	MOVFF	FSR1L, FSR2L
	MOVFF	r0x00, POSTDEC1
	MOVFF	r0x01, POSTDEC1
	MOVFF	r0x02, POSTDEC1
	MOVFF	r0x03, POSTDEC1
	MOVLW	0x02
	MOVFF	PLUSW2, r0x00
	MOVLW	0x03
	MOVFF	PLUSW2, r0x01
	MOVLW	0x04
	MOVFF	PLUSW2, r0x02
	MOVLW	0x05
	MOVFF	PLUSW2, r0x03
	.line	60; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	TXSTAbits.BRGH=brgh&1;                 	// set BRGH bit
	MOVLW	0x01
	ANDWF	r0x01, F
	MOVF	r0x01, W
	ANDLW	0x01
	RLNCF	WREG, W
	RLNCF	WREG, W
	MOVWF	PRODH
	MOVF	_TXSTAbits, W
	ANDLW	0xfb
	IORWF	PRODH, W
	MOVWF	_TXSTAbits
	.line	61; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	BAUDCONbits.BRG16=brg16&1;		// set 16 bits SPBRG
	MOVLW	0x01
	ANDWF	r0x00, F
	MOVF	r0x00, W
	ANDLW	0x01
	SWAPF	WREG, W
	RRNCF	WREG, W
	MOVWF	PRODH
	MOVF	_BAUDCONbits, W
	ANDLW	0xf7
	IORWF	PRODH, W
	MOVWF	_BAUDCONbits
	.line	62; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	SPBRGH=highbyte;                        // set UART speed SPBRGH
	MOVFF	r0x02, _SPBRGH
	.line	63; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	SPBRG=lowbyte;				// set UART speed SPBRGL
	MOVFF	r0x03, _SPBRG
	.line	64; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	RCSTA=0x90;                             // set RCEN and SPEN
	MOVLW	0x90
	MOVWF	_RCSTA
	.line	65; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	BAUDCONbits.RCIDL=1;			// set receive active
	BSF	_BAUDCONbits, 6
	.line	66; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	PIE1bits.RCIE=1;                        // enable interrupt on RX
	BSF	_PIE1bits, 5
	.line	67; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	INTCONbits.PEIE=1;                      // enable peripheral interrupts
	BSF	_INTCONbits, 6
	.line	68; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	IPR1bits.RCIP=0;                        // define low priority for RX interrupt
	BCF	_IPR1bits, 5
	.line	69; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	wpointer=1;                             // initialize write pointer
	MOVLW	0x01
	BANKSEL	_wpointer
	MOVWF	_wpointer, B
	.line	70; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	rpointer=1;                             // initialize read pointer
	MOVLW	0x01
	BANKSEL	_rpointer
	MOVWF	_rpointer, B
	.line	71; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	TXSTAbits.TXEN=1;                       // enable TX
	BSF	_TXSTAbits, 5
	.line	72; /home/mike/CparaPIC/timer1/svn/uart18f2550.c	INTCONbits.GIE=1;
	BSF	_INTCONbits, 7
	MOVFF	PREINC1, r0x03
	MOVFF	PREINC1, r0x02
	MOVFF	PREINC1, r0x01
	MOVFF	PREINC1, r0x00
	MOVFF	PREINC1, FSR2L
	RETURN	

; ; Starting pCode block for Ival
	code
_Ticks4WindowH:
	DB	0x75, 0x00
; ; Starting pCode block for Ival
_Ticks4WindowL:
	DB	0x2f, 0x00
; ; Starting pCode block for Ival
_Ticks4CenterH:
	DB	0x46, 0x00
; ; Starting pCode block for Ival
_Ticks4CenterL:
	DB	0x4f, 0x00
; ; Starting pCode block for Ival
_Ticks4MinimumH:
	DB	0x17, 0x00
; ; Starting pCode block for Ival
_Ticks4MinimumL:
	DB	0x6f, 0x00
; ; Starting pCode block for Ival
_Ticks4MaximumH:
	DB	0x6b, 0x00
; ; Starting pCode block for Ival
_Ticks4MaximumL:
	DB	0xcf, 0x00
; ; Starting pCode block for Ival
_Ticks4Window:
	DB	0x2f, 0x75
; ; Starting pCode block for Ival
_Ticks4Minimum:
	DB	0x6f, 0x17
; ; Starting pCode block for Ival
_Ticks4Center:
	DB	0x4f, 0x46
; ; Starting pCode block for Ival
_Ticks4Maximum:
	DB	0xcf, 0x6b
; ; Starting pCode block
__str_0:
	DB	0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x6f, 0x20
	DB	0x69, 0x6e, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x64, 0x6f
	DB	0x00
; ; Starting pCode block
__str_1:
	DB	0x50, 0x49, 0x43, 0x31, 0x38, 0x46, 0x32, 0x35, 0x35, 0x30, 0x20, 0x65
	DB	0x6e, 0x20, 0x53, 0x44, 0x43, 0x43, 0x00
; ; Starting pCode block
__str_2:
	DB	0x30, 0x00
; ; Starting pCode block
__str_3:
	DB	0x33, 0x00
; ; Starting pCode block
__str_4:
	DB	0x31, 0x00
; ; Starting pCode block
__str_5:
	DB	0x32, 0x00
; ; Starting pCode block
__str_6:
	DB	0x6f, 0x6b, 0x00


; Statistics:
; code size:	 6170 (0x181a) bytes ( 4.71%)
;           	 3085 (0x0c0d) words
; udata size:	  233 (0x00e9) bytes (13.00%)
; access size:	   12 (0x000c) bytes


	end
